:root {
    /* Fonts */
    --main-font: 'Outfit', sans-serif;
    --border-radius: 15px;

    /* Femboy Colors (Default) */
    --light-blue: #5bcefa;
    --pink: #f5a9b8;
    --white: #ffffff;

    --primary-color: var(--light-blue);
    --secondary-color: var(--pink);

    /* Dark Theme Default */
    --bg-color: #0d1117;
    --text-color: #e6edf3;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --highlight: var(--primary-color);
}

/* === MODES === */
[data-mode="femboy"] {
    --main-font: 'Outfit', sans-serif;
    --primary-color: #5bcefa;
    --secondary-color: #f5a9b8;
    --border-radius: 15px;
}

[data-mode="minecraft"] {
    --main-font: 'Press Start 2P', cursive;
    --primary-color: #74b027; /* Grass Green */
    --secondary-color: #866043; /* Dirt Brown */
    --border-radius: 0px; /* Square */
    --glass-bg: rgba(0, 0, 0, 0.85); /* Solid dark */
    --glass-border: rgba(116, 176, 39, 0.8);
}

[data-mode="csgo"] {
    --main-font: 'Chakra Petch', sans-serif;
    --primary-color: #e1b664; /* Terrorist Yellow/Orange */
    --secondary-color: #5a819e; /* Counter-Terrorist Blue */
    --border-radius: 4px; /* Sharp tactical corners */
}

[data-mode="standoff"] {
    --main-font: 'Russo One', sans-serif;
    --primary-color: #ff5722; /* Neon Orange */
    --secondary-color: #b71c1c; /* Dark Red */
    --border-radius: 8px;
}

/* === THEMES (Light/Dark) === */
[data-theme="light"] {
    --bg-color: #f0f4f8;
    --text-color: #1a1a1a;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
}

[data-theme="light"][data-mode="minecraft"] {
    --bg-color: #dcdcdc; /* Lighter stone for light theme */
    --glass-bg: rgba(255, 255, 255, 0.9);
}

/* === SEASONS (Modifies primary/secondary colors if not overridden by modes, 
   but since modes dictate colors, we can blend them or let modes take priority. 
   For now, modes take priority over seasons, or we can make seasons shift the hue.) 
   To keep it simple: Mode colors are base, seasons can add a subtle tint to background. */
[data-season="winter"] { --bg-color-tint: #0a1128; }
[data-season="spring"] { --bg-color-tint: #1a0f1a; }
[data-season="summer"] { --bg-color-tint: #0d1117; }
[data-season="autumn"] { --bg-color-tint: #1a120a; }

[data-theme="dark"] {
    background: linear-gradient(135deg, var(--bg-color), var(--bg-color-tint, var(--bg-color)));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--main-font);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.3s ease, color 0.3s ease, font-family 0.3s ease;
}

/* Loader */
.loader-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}
.progress-bar-container {
    width: 60%;
    height: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 20px;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.2s ease;
}

/* Base Utility Classes */
.hidden { display: none !important; }
.fade-out { opacity: 0; }
.fade-in { animation: fadeIn 0.8s ease forwards; }
.delay-1 { animation-delay: 0.3s; opacity: 0; }
@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Layout */
.app-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Glassmorphism */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Minecraft Mode Specific Overrides */
[data-mode="minecraft"] .glass-panel,
[data-mode="minecraft"] .glass-btn,
[data-mode="minecraft"] .modal-content {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 3px solid var(--primary-color);
    box-shadow: 4px 4px 0px var(--secondary-color);
}
[data-mode="minecraft"] .glass-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--secondary-color);
}
[data-mode="minecraft"] h1 { font-size: 1.3rem; }
[data-mode="minecraft"] p, [data-mode="minecraft"] span, [data-mode="minecraft"] div { font-size: 0.75rem; line-height: 1.6; }
[data-mode="minecraft"] h3 { font-size: 0.9rem; }

.glass-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}
.glass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: var(--highlight);
}
.glass-btn.highlight {
    background: linear-gradient(135deg, rgba(91, 206, 250, 0.2), rgba(245, 169, 184, 0.2));
    border-color: var(--highlight);
}
[data-mode="csgo"] .glass-btn.highlight, [data-mode="standoff"] .glass-btn.highlight {
    background: linear-gradient(135deg, rgba(225, 182, 100, 0.2), rgba(90, 129, 158, 0.2));
}

/* Header Controls */
.top-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* Custom Select Dropdowns */
.custom-select-wrapper {
    position: relative;
    user-select: none;
}
.custom-select-trigger {
    min-width: 120px;
    justify-content: space-between;
}
.custom-select-options {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    width: max-content;
    min-width: 100%;
    z-index: 100;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}
.custom-select-wrapper.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.custom-option {
    padding: 10px 15px;
    border-radius: calc(var(--border-radius) - 5px);
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
    font-size: 0.9rem;
}
[data-mode="minecraft"] .custom-option { border-radius: 0; }

.custom-option:hover, .custom-option.selected {
    background: rgba(255, 255, 255, 0.1);
    color: var(--highlight);
}

/* Profile Section */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}
.avatar-glow {
    position: relative;
    border-radius: 50%;
}
.avatar-glow::before {
    content: '';
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    z-index: -1;
    animation: spin 3s linear infinite;
}
[data-mode="minecraft"] .avatar-glow, [data-mode="minecraft"] .avatar-glow::before {
    border-radius: 0;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}
.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-color);
}
[data-mode="minecraft"] .avatar { border-radius: 0; }

.badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    color: var(--highlight);
    border: 1px solid var(--glass-border);
}

/* Social Links */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

/* Widgets Grid */
.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.widget h3 {
    margin-bottom: 15px;
    color: var(--highlight);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

/* Info Rows */
.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
}
.info-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.info-value {
    font-weight: 600;
    color: var(--highlight);
}

/* Buttons inside widgets */
.refresh-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s, transform 0.3s;
}
.refresh-btn:hover { color: var(--highlight); }
.spin i { animation: spin-icon 0.8s linear infinite; }
@keyframes spin-icon {
    100% { transform: rotate(360deg); }
}

/* Skeleton Loader */
.skeleton-loader {
    width: 100%;
    height: 80px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: loading-skeleton 1.5s infinite;
    border-radius: calc(var(--border-radius) - 5px);
}
@keyframes loading-skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}
.modal-content {
    max-width: 400px;
    text-align: center;
    padding: 30px;
}
.modal-content h3 { color: var(--highlight); margin-bottom: 15px; font-family: inherit; }
.modal-content p { margin-bottom: 20px; font-family: inherit; }
