/* ==================== THEME UTILITIES ==================== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 26, 46, 0.3);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FFD54F;
}

/* ==================== ANIMATION UTILITIES ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* ==================== UTILITY CLASSES ==================== */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

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

/* Text utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #FFD54F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-glow {
    text-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
}

.text-shadow-dark {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ==================== BUTTON UTILITIES ==================== */
.btn-base {
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 193, 7, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ==================== CARD UTILITIES ==================== */
.card-glass {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
}

.card-glass:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 193, 7, 0.1);
}

.card-elevated {
    background: var(--secondary-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.card-elevated:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ==================== SPACING UTILITIES ==================== */
.container-fluid {
    width: 100%;
    padding: 0 2rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Margin utilities */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.mx-auto { margin-left: auto; margin-right: auto; }

/* Padding utilities */
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

/* ==================== DISPLAY UTILITIES ==================== */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.grid {
    display: grid;
}

.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden !important;
}

/* ==================== BACKDROP EFFECTS ==================== */
.backdrop-blur {
    backdrop-filter: blur(10px);
}

.backdrop-blur-lg {
    backdrop-filter: blur(20px);
}

.backdrop-saturate {
    backdrop-filter: blur(10px) saturate(180%);
}

/* ==================== GRADIENT UTILITIES ==================== */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), #FFD54F);
}

.gradient-dark {
    background: linear-gradient(135deg, #0F3460 0%, #1A1A2E 100%);
}

.gradient-bottom {
    background: linear-gradient(180deg, #1A1A2E 0%, #0F3460 100%);
}

/* ==================== SHADOW UTILITIES ==================== */
.shadow-sm {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.shadow-md {
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
}

.shadow-lg {
    box-shadow: 0 15px 40px rgba(31, 38, 135, 0.3);
}

.shadow-glow {
    box-shadow: 0 0 30px rgba(255, 193, 7, 0.2);
}

/* ==================== TRANSFORM UTILITIES ==================== */
.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-spin:hover {
    transform: rotate(180deg);
}

/* ==================== RESPONSIVE GRID ==================== */
.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1rem;
    }
}

/* ==================== FOCUS STATES ==================== */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus,
a:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

/* ==================== ACCESSIBILITY ==================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}
