/**
 * Pinany - Multi-Platform Video Downloader
 * Global Styles
 */

/* ============================================
   Global Background & Theme
   ============================================ */

body {
    background: linear-gradient(135deg, #ffffff 0%, #fefcf5 100%);
    background-attachment: fixed;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #171717 0%, #1a1915 100%);
    background-attachment: fixed;
}

/* Subtle accent glow in top-right corner */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.03) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

[data-theme="dark"] body::before {
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 60%);
}

/* ============================================
   Custom Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #404040;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #525252;
}

/* ============================================
   Common Transitions
   ============================================ */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ============================================
   Glassmorphism
   ============================================ */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .glass {
    background: rgba(23, 23, 23, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================
   Animations
   ============================================ */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .7; }
}

/* ============================================
   Toast Notification
   ============================================ */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 500;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.error {
    background: rgba(239, 68, 68, 0.95);
    color: white;
}

.toast.success {
    background: rgba(34, 197, 94, 0.95);
    color: white;
}

/* ============================================
   Modal
   ============================================ */
#redirectModal {
    backdrop-filter: blur(4px);
}

/* ============================================
   Language Banner
   ============================================ */
.lang-banner {
    background: linear-gradient(90deg, #171717, #262626);
    color: white;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 100;
}

.lang-banner.show {
    transform: translateY(0);
}

.lang-banner .switch-btn {
    background: #D4AF37;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 12px;
}

.lang-banner .switch-btn:hover {
    background: #B8962E;
}

.lang-banner .close-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 18px;
    margin-left: 8px;
    padding: 0 4px;
}

.lang-banner .close-btn:hover {
    color: white;
}