/* ============================================
   THEME VARIABLES & RESET
   ============================================ */

:root {
    /* Light Mode (Default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --primary-gold: #997226;
    --primary-color: var(--primary-gold);
    --gold-light: #e6b347;
    --gold-dark: #b38829;
    --accent-primary: #997226;
    --accent-secondary: #e6b347;
    --accent-tertiary: #b38829;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(0, 0, 0, 0.5);
    --text-primary: #0a0a0a;
    --text-secondary: rgba(0, 0, 0, 0.75);
    --text-muted: rgba(0, 0, 0, 0.5);
    --success: #4caf50;
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(204, 153, 51, 0.2);
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --success: #66bb6a;
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(204, 153, 51, 0.3);
    --primary-gold: #cc9933;
    --accent-primary: #cc9933;
    --accent-secondary: #e6b347;
    --accent-tertiary: #b38829;
}

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

a {
    text-decoration: none;
    color: inherit;
}

a:hover,
a:focus {
    text-decoration: none;
    outline: none;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s var(--transition), color 0.3s var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(204, 153, 51, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(204, 153, 51, 0.02) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(204, 153, 51, 0.01) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(204, 153, 51, 0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(204, 153, 51, 0.01) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
    animation: gridMove 10s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

/* ============================================
   GLASS EFFECT
   ============================================ */

.glass {
    border-radius: 0;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(204, 153, 51, 0.05), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.glass:hover::before {
    opacity: 1;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.3s var(--transition);
}

.navbar.scrolled {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.2));
}

[data-theme="light"] .nav-container {
    filter: drop-shadow(0px 2px 4px rgba(255, 255, 255, 0.6));
}

[data-theme="dark"] .nav-container {
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.4));
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-logo-text {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-gold);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
    flex: 1;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s var(--transition);
    position: relative;
    text-align: center;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gold);
    transition: width 0.3s var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s var(--transition);
}

/* ============================================
   THEME TOGGLE
   ============================================ */

.theme-toggle {
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 0;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: color-mix(in srgb, var(--primary-color), transparent 90%);
    border-color: var(--primary-color);
}

.theme-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    display: block;
}

.sun-icon {
    display: block;
}

.moon-icon {
    display: none;
}

.theme-toggle-text {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: block;
}

/* ============================================
   MOBILE MENU
   ============================================ */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    visibility: visible;
    opacity: 1;
}

.mobile-menu {
    position: fixed;
    top: 90px;
    left: 20px;
    right: 20px;
    padding: 30px;
    transform: translateY(-150%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s var(--transition), opacity 0.3s var(--transition), visibility 0.3s var(--transition);
    z-index: 999;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 12px 20px;
    text-align: center;
    display: block;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.5);
    transition: color 0.3s var(--transition), border-color 0.3s var(--transition);
}

[data-theme="light"] .mobile-link {
    background: rgba(255, 255, 255, 0.5);
}

.mobile-link:hover {
    color: var(--primary-gold);
}

.theme-toggle-mobile {
    background: color-mix(in srgb, var(--primary-color), transparent 90%);
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    width: auto;
    margin: 20px 0;
}

[data-theme="light"] .theme-toggle-mobile {
    color: #000;
}

.theme-toggle-mobile:hover {
    background: color-mix(in srgb, var(--primary-color), transparent 80%);
}

/* ============================================
   MAIN CONTENT & VERIFY FORM
   ============================================ */

.main-content {
    flex: 1;
    padding-top: 140px;
    padding-bottom: 60px;
}

.verify-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 50px 40px;
    text-align: center;
}

.verify-container.glass {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.verify-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary-gold);
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.verify-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.verify-step {
    margin-bottom: 20px;
}

.step-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.verify-info {
    margin-bottom: 15px;
    min-height: 20px;
}

.verify-info label {
    font-size: 14px;
    color: var(--text-primary);
}

.verify-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.verify-input {
    width: 100%;
    max-width: 400px;
    padding: 15px 20px;
    border: 1px solid var(--glass-border);
    border-radius: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s var(--transition);
}

.verify-input:focus {
    border-color: var(--primary-gold);
}

.verify-input::placeholder {
    color: var(--text-muted);
}

.verify-button {
    padding: 15px 40px;
    border: none;
    border-radius: 0;
    background: var(--primary-gold);
    color: #000;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--transition);
    max-width: 400px;
    min-width: 200px;
}

[data-theme="light"] .verify-button {
    color: #fff;
}

.verify-button:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
}

.footer-content-new {
    text-align: center;
}

.footer-line {
    padding: 15px 0;
}

.footer-logo-section {
    border-bottom: 1px solid var(--glass-border);
}

.footer-logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-logo-text {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-gold);
}

.footer-links-line {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    border-bottom: 1px solid var(--glass-border);
}

.footer-links-line a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links-line a:hover {
    color: var(--primary-gold);
}

.footer-copyright-line p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-copyright-line a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-copyright-line a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ============================================
   THREE.JS CANVAS BACKGROUND
   ============================================ */

#three-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: transparent;
}

/* Performance optimization for mobile */
@media (max-width: 768px) {
    #three-canvas {
        opacity: 0.35;
    }

    body::after {
        display: none;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .nav-menu {
        display: none !important;
    }

    .nav-toggle {
        display: flex;
    }

    .main-content {
        padding-top: 120px;
        padding-bottom: 40px;
    }

    .verify-container {
        padding: 30px 20px;
    }

    .verify-title {
        font-size: 36px;
    }

    .verify-subtitle {
        font-size: 16px;
    }

    .footer-links-line {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .verify-title {
        font-size: 28px;
    }

    .verify-subtitle {
        font-size: 14px;
    }

    .verify-input,
    .verify-button {
        max-width: 100%;
    }
}

/* UCASH Loading Animation */
.ucash-loading {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.ucash-logo-spinner {
    width: 24px;
    height: 24px;
    animation: rotate 2s linear infinite;
}

.ucash-logo-spinner circle {
    fill: none;
    stroke: var(--primary-gold, #cc9933);
    stroke-width: 2;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

.ucash-logo-spinner .ucash-u {
    fill: var(--primary-gold, #cc9933);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

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

/* Checkmark animation */
.balance-check {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.balance-check.success {
    color: var(--success, #4caf50);
}

.balance-check.error {
    color: #f44336;
    opacity: 0.5;
}
