/* === Main variables === */
:root {
    /* === EXISTING VARIABLES === */
    --color-bg: #242424;
    --color-header-bg: #161616;
    --color-footer-bg: #0D0C0C;
    --color-card-bg: #2A2A2A;
    --color-accent: rgba(215, 51, 60, 1);
    --color-accent-hover: #FF4A56;
    --color-blue: #337AD7;
    --color-light-blue: #ABCFFF;
    --color-white: #fff;
    --color-gray: #B3B3B3;
    --color-light-gray: #E5E5E5;
    --color-dark: #181818;
    --color-border: #3B3B3B;
    --radius: 10px;
    --radius-sm: 5px;
    --shadow: 0 4px 32px 0 rgba(0, 0, 0, 0.25);
    --font-main: 'Kanit', 'Inter', sans-serif;
    --transition-duration: 800ms;
    --transition-timing: cubic-bezier(0.4, 0.0, 0.2, 1);
    
    /* === ADDITIONAL VARIABLES FOR ACCOUNT PAGE === */
    
    /* Background Colors */
    --color-bg-primary: #242424;
    --color-bg-secondary: #202020;
    --color-bg-card: #2A2A2A;
    
    /* Extended Color Palette */
    --color-muted: #666666;
    --color-dark-gray: #888888;
    
    /* Text Colors */
    --color-text-light: #E5E5E5;
    --color-text-secondary: #AFAFAF;
    
    /* Accent Variations */
    --color-accent-bg: rgba(215, 51, 60, 0.2);
    --color-accent-dark: #c5252e;
    --color-accent-light: rgba(215, 51, 60, 0.1);
    --color-accent-solid: rgba(215, 51, 60, 0.9);
    
    /* Border Colors */
    --color-border-light: rgba(255, 255, 255, 0.05);
    --color-border-strong: rgba(255, 255, 255, 0.2);
    
    /* Status Colors */
    --color-success: #22c55e;
    --color-success-bg: rgba(34, 197, 94, 0.2);
    --color-success-border: rgba(34, 197, 94, 0.3);
    
    --color-warning: #eab308;
    --color-warning-bg: rgba(234, 179, 8, 0.2);
    --color-warning-border: rgba(234, 179, 8, 0.3);
    
    --color-error: #ef4444;
    --color-error-bg: rgba(239, 68, 68, 0.2);
    --color-error-border: rgba(239, 68, 68, 0.3);
    --color-error-dark: #dc2626;
    --color-error-light: #fca5a5;
    
    --color-info: #3b82f6;
    --color-info-bg: rgba(59, 130, 246, 0.2);
    --color-info-border: rgba(59, 130, 246, 0.3);
    
    /* Additional UI Colors */
    --color-card-hover: rgba(255, 255, 255, 0.15);
    
    /* Payment Method Colors */
    --color-paypal: #0070d2;
    --color-paypal-bg: rgba(0, 112, 210, 0.2);
    --color-paypal-border: rgba(0, 112, 210, 0.3);
    
    --color-card: #6a6cce;
    --color-card-payment-bg: rgba(99, 102, 241, 0.2);
    --color-card-border: rgba(99, 102, 241, 0.3);
    
    --color-generic-payment: #9ca3af;
    --color-generic-payment-bg: rgba(156, 163, 175, 0.2);
    --color-generic-payment-border: rgba(156, 163, 175, 0.3);
    
    /* Gift/Special Colors */
    --color-gift: #fbbf24;
    --color-gift-bg: rgba(251, 191, 36, 0.2);
    
    /* Extended Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    --spacing-2xl: 24px;
    --spacing-3xl: 32px;
    --spacing-4xl: 48px;
    
    /* Extended Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.25);
    --shadow-2xl: 0 20px 40px rgba(0, 0, 0, 0.3);
    --shadow-accent: 0 4px 16px rgba(215, 51, 60, 0.2);
    --shadow-accent-hover: 0 8px 32px rgba(215, 51, 60, 0.4);
    --shadow-error: 0 4px 12px rgba(239, 68, 68, 0.3);
    
    /* Extended Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
    --transition-base: 0.3s ease;
    
    /* Extended Border Radius */
    --radius-xs: 2px;
    --radius-full: 50%;
    
    /* Typography */
    --font-mono: 'Courier New', Monaco, monospace;
    
    /* Gradients */
    --bg-gradient-accent: linear-gradient(135deg, var(--color-accent) 0%, #8b1e24 100%);
    --gradient-accent: linear-gradient(180deg, #D7333C 0%, #711B1F 100%);
    --gradient-accent-dark: linear-gradient(180deg, #cd282f 0%, #7f2126 100%);
    --gradient-orange: linear-gradient(135deg, rgba(215, 119, 6, 1), rgba(195, 99, 0, 1));
    --gradient-blue: linear-gradient(135deg, rgba(99, 102, 241, 1), rgba(79, 82, 221, 1));
    
    /* Red Theme Gradients */
    --color-red-primary: rgb(175, 22, 22);
    --color-red-secondary: rgb(227, 78, 78);
    --color-red-hover-primary: rgb(195, 42, 42);
    --color-red-hover-secondary: rgb(247, 98, 98);
    --gradient-red: linear-gradient(135deg, var(--color-red-primary), var(--color-red-secondary));
    --gradient-red-hover: linear-gradient(135deg, var(--color-red-hover-primary), var(--color-red-hover-secondary));
    
    /* Scrollbar Colors */
    --color-scrollbar-track: rgba(17, 17, 17, 1);
    --color-scrollbar-thumb: rgba(147, 147, 147, 1);
    
    /* Text Colors Extended */
    --color-text-tertiary: #939393;
    --color-text-placeholder: rgba(229, 229, 229, 0.5);
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* === UTILITY CLASSES FOR ACCOUNT PAGE === */

/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-accent);
}

.btn-secondary {
    background: var(--color-info);
    color: var(--color-white);
}

.btn-secondary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-danger {
    background: var(--color-error);
    color: var(--color-white);
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Badge Components */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-4xl) var(--spacing-xl);
    text-align: center;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: var(--spacing-lg);
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-white);
    margin: 0 0 var(--spacing-sm) 0;
}

.empty-state p {
    font-size: 16px;
    color: var(--color-gray);
    margin: 0 0 var(--spacing-2xl) 0;
    max-width: 400px;
}

/* No Results */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px var(--spacing-xl);
    text-align: center;
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-lg);
    opacity: 0.6;
}

.no-results h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-white);
    margin: 0 0 var(--spacing-sm) 0;
}

.no-results p {
    font-size: 14px;
    color: var(--color-gray);
    margin: 0;
    max-width: 300px;
}

.hidden {
    display: none !important;
}

body {
    background: var(--color-bg);
    color: var(--color-white);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

* {
    box-sizing: border-box;
    font-family: var(--font-main);
}

.section {
    border-radius: var(--radius);
    overflow: hidden;
}

.section-title {
    padding: 6.5px 26px;
    background-color: rgba(22, 22, 22, 1);
    font-weight: 600;
    font-size: 24px;
    line-height: 36px;
    color: #E5E5E5;
}

.section-content {
    padding: 20px 26px;
    background-color: rgba(32, 32, 32, 1);
}

.main-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 40px;
    background: url(https://static.rustyfiles.xyz/main-bg.jpg) no-repeat;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* === Body override for loading states === */
body {
    background: url(https://static.rustyfiles.xyz/main-bg.jpg) no-repeat;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow-x: hidden;
}

body.loaded {
    background: var(--color-bg) !important;
    padding-right: 0;
    overflow-x: hidden;
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url(https://static.rustyfiles.xyz/main-bg.jpg) no-repeat;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 1;
    transform: scale(1);
    border-radius: 0%;
    visibility: visible;
    pointer-events: auto;
    transition:
        opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        border-radius 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Animation phases for manual control */
.loader.shrinking .loader-content {
    transform: scale(0);
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.loader.fading {
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.loader.hidden {
    opacity: 1;
    transform: scale(1);
    border-radius: 0%;
    pointer-events: none;
    transition:
        opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s,
        visibility 0s linear 1s;
    animation: finalFadeOut 0.4s ease-out 0.6s forwards;
}

@keyframes finalFadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Base URL - blank black screen */
.loader.blank-screen .loader-content {
    display: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.loader.hidden .loader-content {
    transform: scale(0);
}

.loader-logo {
    width: 200px;
    height: auto;
    margin-bottom: 30px;
    animation: logoFadeIn 1s ease-out;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #E20511;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .main-wrapper {
        padding-top: 40px;
        padding-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .loader-logo {
        width: 150px;
        margin-bottom: 20px;
    }

    .loader-spinner {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .loader-logo {
        width: 120px;
        margin-bottom: 15px;
    }
}