/**
 * 369 Manifestation - Design System & Custom CSS
 * Premium Lavender & Purple Theme with Soft Gold Accents & Glassmorphism
 */

:root {
    --primary: #7C3AED;
    --primary-light: #A78BFA;
    --primary-dark: #5B21B6;
    --accent-gold: #F5C76E;
    --accent-gold-hover: #EAB308;
    --bg-light: #FAF8FF;
    --card-light: rgba(255, 255, 255, 0.85);
    --border-light: rgba(167, 139, 250, 0.2);
    --text-primary: #201A35;
    --text-muted: #64748B;
}

.dark {
    --primary: #8B5CF6;
    --primary-light: #C4B5FD;
    --primary-dark: #4C1D95;
    --accent-gold: #FCD34D;
    --accent-gold-hover: #F59E0B;
    --bg-light: #0F0B1E;
    --card-light: rgba(26, 20, 48, 0.85);
    --border-light: rgba(139, 92, 246, 0.25);
    --text-primary: #F8FAFC;
    --text-muted: #94A3B8;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* RTL Typography & Direction overrides */
[dir="rtl"] {
    font-family: 'Noto Naskh Arabic', 'Amiri', 'Plus Jakarta Sans', Tahoma, sans-serif;
    text-align: right;
}
[dir="rtl"] .ltr-only {
    direction: ltr;
    text-align: left;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--card-light);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    box-shadow: 0 10px 30px -10px rgba(124, 58, 237, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
    box-shadow: 0 20px 40px -15px rgba(124, 58, 237, 0.16);
}

/* Gradient accents */
.bg-brand-gradient {
    background: linear-gradient(135deg, #7C3AED 0%, #9333EA 50%, #C084FC 100%);
}

.bg-gold-gradient {
    background: linear-gradient(135deg, #FDE68A 0%, #F5C76E 50%, #D97706 100%);
}

.text-gradient {
    background: linear-gradient(135deg, #7C3AED 0%, #C084FC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gold-gradient {
    background: linear-gradient(135deg, #F59E0B 0%, #F5C76E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Subtle glow animations */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(124, 58, 237, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(245, 199, 110, 0.4);
    }
}

.glow-active {
    animation: pulseGlow 3s infinite ease-in-out;
}

/* Interactive Practice Input Fields */
.practice-input {
    transition: all 0.2s ease;
    border: 1.5px solid #E2E8F0;
}

.dark .practice-input {
    border-color: #3730A3;
    background-color: #1E1738;
    color: #F8FAFC;
}

.practice-input:focus {
    border-color: #7C3AED;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.practice-input.is-valid-entry {
    border-color: #10B981;
    background-color: rgba(16, 185, 129, 0.05);
}

/* Toast Notifications Container */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

[dir="rtl"] #toast-container {
    right: auto;
    left: 24px;
}

.toast-item {
    pointer-events: auto;
    min-width: 280px;
    max-width: 420px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.95rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    backdrop-filter: blur(8px);
}

@keyframes slideInToast {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Achievement Certificate Print & Download Layout */
@media print {
    body * {
        visibility: hidden;
    }
    #certificate-container, #certificate-container * {
        visibility: visible;
    }
    #certificate-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 40px;
        box-shadow: none !important;
        border: 4px double #7C3AED !important;
    }
    .no-print {
        display: none !important;
    }
}
