@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom Styles */
@layer components {
    .btn-primary {
        @apply px-6 py-3 rounded-2xl font-semibold text-slate-950 transition-all duration-300;
        background: linear-gradient(135deg, #c29f32 0%, #e5c65a 42%, #f7de83 100%);
        box-shadow: 0 18px 35px rgba(196, 159, 50, 0.24);
    }
    
    .btn-primary:hover {
        background: linear-gradient(135deg, #d4af37 0%, #f4d96b 42%, #fde48f 100%);
    }

    .btn-secondary {
        @apply px-6 py-3 text-white rounded-2xl font-semibold border border-slate-700 transition-all duration-300;
        background: rgba(15, 23, 42, 0.9);
        backdrop-filter: blur(12px);
    }

    .btn-secondary:hover {
        background: rgba(20, 30, 48, 0.95);
    }

    .section-title {
        font-size: 2.25rem;
        line-height: 1.05;
        font-weight: 800;
        margin-bottom: 1rem;
        background: linear-gradient(90deg, #f7dd8a, #d4af37 50%, #f9e293);
        -webkit-background-clip: text;
        color: transparent;
    }

    .card {
        background: rgba(10, 15, 27, 0.92);
        border: 1px solid rgba(212, 175, 55, 0.14);
        border-radius: 1.5rem;
        box-shadow: 0 24px 68px rgba(0, 0, 0, 0.35);
        transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    }

    .card:hover {
        transform: translateY(-6px);
        border-color: rgba(212, 175, 55, 0.26);
        box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
    }

    .container-fluid {
        @apply w-full px-4 sm:px-6 lg:px-8;
    }

    .bg-dark-primary {
        background: #06111f;
    }

    .bg-dark-secondary {
        background: #0d172c;
    }

    .text-dark-primary {
        color: #f7df81;
    }

    .text-dark-secondary {
        color: #e6d291;
    }

    .bg-orange-primary {
        background: linear-gradient(135deg, #c29f32 0%, #d4af37 60%, #f7de83 100%);
        color: #111827;
    }

    .admin-card {
        background: rgba(10, 18, 35, 0.92);
        border: 1px solid rgba(212, 175, 55, 0.16);
        border-radius: 1.5rem;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
        transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    }

    .admin-card:hover {
        transform: translateY(-4px);
        border-color: rgba(212, 175, 55, 0.26);
        box-shadow: 0 24px 62px rgba(0, 0, 0, 0.32);
    }

    .admin-panel {
        background: linear-gradient(180deg, #050b18 0%, #0a1227 100%);
        border: 1px solid rgba(255, 255, 255, 0.04);
    }

    .bg-gold-gradient {
        background: linear-gradient(135deg, #c29f32 0%, #d4af37 55%, #f7de83 100%);
    }
}

/* Smooth Animations */
@layer utilities {
    .fade-in {
        animation: fadeIn 0.6s ease-in;
    }

    .slide-up {
        animation: slideUp 0.6s ease-out;
    }

    .text-gold-primary {
        color: #fbdd7a;
    }

    .bg-gold-primary {
        background: linear-gradient(135deg, #c29f32 0%, #d4af37 50%, #f7de83 100%);
    }

    .border-gold-primary {
        border-color: rgba(212, 175, 55, 0.9);
    }

    .premium-surface {
        background: linear-gradient(180deg, #060914 0%, #0f172a 65%, #111827 100%);
    }

    .glow-ring {
        box-shadow: 0 0 28px rgba(212, 175, 55, 0.18);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Premium Amber Overrides */
.text-amber-300 {
    color: #f5d877 !important;
}
.text-amber-200 {
    color: #fff4be !important;
}
.bg-amber-500 {
    background-color: #d4af37 !important;
}
.bg-amber-300 {
    background-color: #f2d982 !important;
}
.hover\:text-amber-300:hover {
    color: #f7e2a5 !important;
}
.hover\:text-amber-200:hover {
    color: #fff4be !important;
}
.hover\:border-amber-400:hover {
    border-color: #c19d2a !important;
}
.from-amber-500 {
    --tw-gradient-from: #d4af37 !important;
}
.to-amber-600 {
    --tw-gradient-to: #c59d2e !important;
}
.bg-amber-900\/20 {
    background-color: rgba(96, 65, 14, 0.2) !important;
}

/* Global Styles */
body {
    font-family: 'Inter', system-ui, sans-serif;
    color: #f8f0d7;
    background-color: #3d4121;
}

html {
    scroll-behavior: smooth;
}

body.page-transition {
    opacity: 0;
    transition: opacity 0.18s ease;
    will-change: opacity;
}

body.page-transition.loaded {
    opacity: 1;
}

body.page-transition.fade-out {
    opacity: 0;
}

.page-loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
    z-index: 9999;
    will-change: opacity;
}

.page-loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loader-ring {
    width: 3rem;
    height: 3rem;
    border: 4px solid rgba(255, 255, 255, 0.18);
    border-top-color: #f8e08b;
    border-radius: 9999px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
