/* === CSS Variables & Base Setup === */
:root {
    --bg-color: #FCFCFC;
    --text-color: #111111;
    --header-footer-bg: #0B0B0C;
    --text-light: #FFFFFF;
    --text-gray: #A0A0A0;
    --accent-gradient: linear-gradient(90deg, #00C9FF 0%, #92FE9D 50%, #FF758C 100%);
    --button-gradient: linear-gradient(90deg, #FF512F 0%, #DD2476 100%);
    --divider-color: #333333;
    --header-height: 80px;
    --mobile-nav-height: 60px;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #E0E0E0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s, color 0.3s;
    font-size: 16px;
    line-height: 1.6;
}

/* Fix for WordPress Admin Bar overlap */
body.admin-bar header#main-header {
    top: 32px;
}

/* === Header === */
header {
    background-color: var(--header-footer-bg);
    color: var(--text-light);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.logo-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.spacer { flex-grow: 1; }

/* Desktop Navigation - Adapted for WP wp_nav_menu layout */
.desktop-nav ul {
    display: flex;
    gap: 25px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    color: var(--text-light);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
    padding: 10px 0;
    display: inline-block;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: center;
}

.nav-item:hover::after, .desktop-nav ul li.current-menu-item > a::after {
    transform: scaleX(1);
}

/* Header Actions Group */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 20px;
}

.coin-widget { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.coin-widget.desktop-only i { color: #FFD700; font-size: 18px; }
.coin-widget.desktop-only .count { font-weight: bold; font-size: 16px; }
.coin-widget.desktop-only .label { font-size: 10px; text-transform: uppercase; color: var(--text-gray); margin-top: 2px; }
.coin-widget.mobile-only { display: none; position: relative; }
.coin-widget.mobile-only i { color: #FFD700; font-size: 24px; }
.coin-widget.mobile-only .bubble { position: absolute; top: -5px; right: -8px; background-color: red; color: white; font-size: 10px; font-weight: bold; padding: 2px 5px; border-radius: 10px; }

.header-actions a, .header-actions button { color: var(--text-light); text-decoration: none; font-size: 14px; font-weight: 600; background: none; border: none; cursor: pointer; }
.header-actions .globe-icon i, .header-actions .theme-toggle i { font-size: 18px; transition: color 0.3s; }
.header-actions .globe-icon:hover i, .header-actions .theme-toggle:hover i { color: var(--text-gray); }

.signup-btn { background: var(--button-gradient) !important; padding: 10px 20px; border-radius: 20px; color: white !important; transition: opacity 0.3s; display: inline-block;}
.signup-btn:hover { opacity: 0.9; }

.hamburger { display: none; font-size: 24px; z-index: 1002; }

/* === Mobile Slide Menu === */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.98);
    z-index: 2001;
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mobile-menu-overlay::-webkit-scrollbar { display: none; }
.mobile-menu-overlay.active { right: 0; }

.mobile-menu-close { position: absolute; top: 25px; right: 25px; background: none; border: none; color: white; font-size: 24px; cursor: pointer; z-index: 2002; }

.mobile-menu-content { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100%; padding: 60px 20px; gap: 20px; }
.mobile-menu-content ul { list-style: none; padding: 0; margin: 0; text-align: center; }
.mobile-menu-content ul li { margin-bottom: 20px; }
.mobile-menu-overlay .nav-item { font-size: 18px; padding: 5px; text-transform: none; font-weight: 500; }

/* === Content Section === */
main { flex-grow: 1; padding: 40px 20px; }
main p { font-size: 1rem; font-weight: 400; }

/* === Footer === */
footer { background-color: var(--header-footer-bg); color: var(--text-light); padding: 60px 40px 30px; }
.footer-top { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1200px; margin: 0 auto; }
.footer-column h4 { font-size: 16px; margin-bottom: 20px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column ul li { margin-bottom: 12px; }
.footer-column ul a { color: var(--text-gray); text-decoration: none; font-size: 14px; transition: color 0.3s; }
.footer-column ul a:hover { color: var(--text-light); }
.footer-column .toggle-icon { display: none; transition: transform 0.3s; }
.footer-spacer { height: 40px; }
.footer-divider { height: 1px; background-color: var(--divider-color); margin-bottom: 20px; max-width: 1200px; margin-left: auto; margin-right: auto; }

.footer-bottom { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; font-size: 12px; color: var(--text-gray); }
.footer-bottom-links { display: flex; gap: 15px; }
.footer-bottom-links a { color: var(--text-gray); text-decoration: none; }

/* === Mobile Sticky Bottom Nav === */
.mobile-bottom-nav {
    display: none; position: fixed; bottom: 0; left: 0; width: 100%;
    background-color: #1A1A1A; height: var(--mobile-nav-height);
    z-index: 999; box-shadow: 0 -2px 10px rgba(0,0,0,0.5); border-top: 1px solid #333;
}
.mobile-bottom-nav ul { display: flex; justify-content: space-around; align-items: center; list-style: none; height: 100%; width: 100%; padding: 0; margin: 0; }
.mobile-bottom-nav li { flex: 1; height: 100%; }
.mobile-bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-gray); text-decoration: none; height: 100%; transition: color 0.3s; font-size: 20px; }
.mobile-bottom-nav a:hover, .mobile-bottom-nav a:active { color: var(--text-light); }

/* === Language Modal === */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 2000; justify-content: center; align-items: flex-start; padding-top: 10px; }
.modal-overlay.active { display: flex; }
.modal-content { background-color: #222; padding: 30px; border-radius: 8px; width: 90%; max-width: 600px; position: relative; max-height: calc(100vh - 20px); overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
.modal-content::-webkit-scrollbar { display: none; }
.modal-close { position: absolute; top: 15px; right: 15px; color: white; background: none; border: none; font-size: 20px; cursor: pointer; }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 15px; margin-top: 20px; }
.lang-btn { background: transparent; border: 1px solid #444; color: white; padding: 15px 10px; border-radius: 5px; cursor: pointer; text-align: center; transition: background 0.3s, border-color 0.3s; }
.lang-btn:hover { background: #333; border-color: #666; }
.lang-btn span { display: block; font-size: 14px; margin-bottom: 5px; }
.lang-btn small { color: #aaa; font-size: 11px; }

/* === Responsive Media Queries === */
@media (max-width: 1100px) { .logo-container { display: none; } }
@media (max-width: 900px) {
    header { padding: 0 15px; }
    .logo-container { display: flex; }
    .desktop-nav { display: none; }
    .header-actions { gap: 15px; margin-left: 0; }
    .coin-widget.desktop-only { display: none; }
    .coin-widget.mobile-only { display: block; }
    .signup-btn.desktop-only { display: none; }
    .hamburger { display: block; }

    footer { padding: 40px 20px 20px; padding-bottom: calc(20px + var(--mobile-nav-height)); }
    .footer-top { grid-template-columns: 1fr; gap: 0; }
    .footer-column { border-bottom: 1px solid #222; }
    .footer-column:last-child { border-bottom: none; }
    .footer-column h4 { margin: 0; padding: 20px 0; cursor: pointer; }
    .footer-column .toggle-icon { display: block; }
    .footer-column ul { display: none; padding-bottom: 20px; }
    .footer-column.active ul { display: block; }
    .footer-column.active .toggle-icon { transform: rotate(180deg); }
    .footer-bottom { flex-direction: column; gap: 15px; }
    .footer-bottom-links { order: 1; width: 100%; justify-content: space-between; }
    .footer-bottom > div:first-child { order: 2; }
    .mobile-bottom-nav { display: block; }
    body { padding-bottom: var(--mobile-nav-height); }
}
@media (max-width: 400px) {
    .header-actions { gap: 10px; }
    .header-actions .login-link { display: none; }
}