/* ============================================
   CAPITAL ALLIANCE - SHARED STYLES
   ============================================ */

/* ============================================
   DARK MODE CSS CUSTOM PROPERTIES
   ============================================ */

:root {
    /* Light Theme Colors */
    --bg-primary: #fafafa;
    --bg-secondary: white;
    --bg-tertiary: #f8f8f8;
    --bg-inverse: #1a1a1a;

    /* Text Colors */
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --text-muted: #999;
    --text-inverse: white;
    --text-on-primary: white;
    --text-footer: var(--text-secondary);

    /* Border & UI Elements */
    --border-color: #e0e0e0;
    --border-light: #f0f0f0;
    --border-dark: #333333;

    /* Accent Colors */
    --accent-primary: #007bff;
    --accent-hover: #0056b3;
    --success-primary: #10b981;
    --success-hover: #059669;
    --warning: #ffc107;
    --warning-text: #856404;
    --danger: #dc2626;

    /* Shadow & Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);

    /* Component Specific */
    --card-bg: white;
    --card-hover-bg: #fafafa;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --mobile-menu-bg: white;

    /* Transition */
    --theme-transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #262626;
    --bg-inverse: #f5f5f5;

    /* Text Colors */
    --text-primary: #f5f5f5;
    --text-secondary: #b3b3b3;
    --text-muted: #808080;
    --text-inverse: #1a1a1a;
    --text-on-primary: #1a1a1a;
    --text-footer: #4a4a4a;

    /* Border & UI Elements */
    --border-color: #333333;
    --border-light: #404040;
    --border-dark: #1a1a1a;

    /* Accent Colors */
    --accent-primary: #4dabf7;
    --accent-hover: #339af0;
    --success-primary: #51cf66;
    --success-hover: #37b24d;
    --warning: #ffd43b;
    --warning-text: #856404;
    --danger: #ff6b6b;

    /* Shadow & Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.5);

    /* Component Specific */
    --card-bg: #1a1a1a;
    --card-hover-bg: #262626;
    --nav-bg: rgba(26, 26, 26, 0.95);
    --mobile-menu-bg: #1a1a1a;
}

/* ============================================
   GLOBAL STYLES & RESET
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, .container, .hero, .benefits, .how-to-stake, .key-numbers,
.benefit-card, .stake-option, .card-bg, .section-title, .section-subtitle,
.topic-card, .faq-item, .btn-primary, .btn-secondary, .nav-links,
.mobile-nav-links a, .mobile-menu, .theme-toggle, input, textarea, select,
.security-topics {
    transition: var(--theme-transition);
}

html {
    scroll-behavior: smooth;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    background: var(--text-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--text-on-primary);
    font-size: 1rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */

.theme-toggle {
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    border-color: var(--text-primary);
    background: var(--bg-tertiary);
    transform: scale(1.05);
}

.theme-toggle:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.theme-icon {
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.3s ease;
}

[data-theme="dark"] .theme-icon {
    filter: brightness(1.2);
}

/* ============================================
   MOBILE MENU SYSTEM
   ============================================ */

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 10px;
    transition: all 0.3s;
}

.mobile-nav-actions {
    display: none;
    align-items: center;
    gap: 0.75rem;
}

.mobile-header-theme-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.mobile-header-theme-toggle:hover {
    border-color: var(--text-primary);
    background: var(--bg-tertiary);
    transform: scale(1.05);
}

.mobile-header-theme-toggle .theme-icon {
    font-size: 1.2rem;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: var(--mobile-menu-bg);
    z-index: 1002;
    transition: right 0.3s ease-out;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.mobile-menu-header .logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mobile-menu-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.mobile-menu-close:hover {
    color: var(--text-primary);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

.mobile-nav-links a {
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.mobile-nav-links a:hover {
    background: var(--bg-tertiary);
    border-left-color: var(--accent-primary);
}

.mobile-theme-toggle {
    width: 100%;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-top: 1px solid var(--border-light);
    border-left: 3px solid transparent;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.mobile-theme-toggle:hover {
    background: var(--bg-tertiary);
    border-left-color: var(--accent-primary);
}

.mobile-theme-toggle .theme-icon {
    font-size: 1.2rem;
}

/* ============================================
   SHARED BUTTON STYLES
   ============================================ */

.btn-primary {
    display: inline-block;
    background: var(--text-primary);
    color: var(--text-on-primary);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--text-muted);
    transform: translateY(-2px);
}

.btn-primary:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--text-primary);
    padding: 1rem 2rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background: var(--bg-tertiary);
}

.btn-secondary:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ============================================
   SECTION TITLES & SUBTITLES
   ============================================ */

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    background: var(--bg-inverse);
    color: var(--text-inverse);
    padding: 60px 0 30px;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.footer-logo-icon {
    width: 30px;
    height: 30px;
    background: var(--text-inverse);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--bg-inverse);
    font-size: 0.8rem;
}

.footer-logo-text {
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-footer);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--text-inverse);
}

.footer-bottom {
    color: var(--text-footer);
    font-size: 0.85rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-dark);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-nav-actions {
        display: flex;
    }

    .mobile-header-theme-toggle {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .logo-icon {
        width: 50px;
        height: 50px;
    }

    .logo-text {
        font-size: 1.4rem;
    }
}
