/* Custom CSS Variables */
:root {
    --primary: #00FFA3;
    --primary-dark: #01E193;
    --text-primary: #181c32;
    --text-secondary: #222;
    --text-muted: #888;
    --text-dark: #181c32;
    --text-light: #444;
    --bg-primary: #fff;
    --bg-secondary: #f6f8fa;
    --bg-light: #f8fafd;
    --card-bg: #fff;
    --border-color: #e0e6ed;
    --highlight-bg: #f8fafd;
    --success-bg: #f0fff4;
    --shadow-light: rgba(0,0,0,0.05);
    --shadow-hover: rgba(0,0,0,0.1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --text-primary: #ffffff;
    --text-secondary: #e6e6e6;
    --text-muted: #b3b3b3;
    --text-dark: #ffffff;
    --text-light: #b3b3b3;
    --bg-primary: #161b22;
    --bg-secondary: #0d1117;
    --bg-light: #0d1117;
    --card-bg: #161b22;
    --border-color: #30363d;
    --highlight-bg: #1c2027;
    --success-bg: #0d2818;
    --shadow-light: rgba(0,0,0,0.3);
    --shadow-hover: rgba(0,0,0,0.5);
}

/* Base Styles */
body {
    background: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Layout Styles */
.main-layout {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    gap: 2rem;
    padding: 0 1rem;
}

.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.sidebar-ad {
    width: 200px;
    position: sticky;
    top: 100px;
    height: fit-content;
    flex-shrink: 0;
}

.sidebar-ad.left {
    order: -1;
}

.sidebar-ad.right {
    order: 1;
}

.ad-banner {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,255,163,0.15);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    will-change: transform;
    backface-visibility: hidden;
}

.ad-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,255,163,0.25);
}

.ad-banner img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.ad-banner:hover img {
    transform: scale(1.02);
}

/* Navigation Styles */
.navbar {
    background: var(--card-bg);
    box-shadow: 0 4px 24px rgba(0,255,163,0.08);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    contain: layout;
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.navbar-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.navbar-menu {
    display: flex;
    gap: 2rem;
}

.navbar-menu a {
    color: var(--text-dark);
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.navbar-menu a:hover {
    background: var(--primary);
    color: #fff;
}

/* Hero Section */
.hero {
    padding: 160px 0 80px;
    text-align: center;
    background: linear-gradient(135deg, rgba(0,255,163,0.1) 0%, rgba(1,225,147,0.1) 100%);
    will-change: transform;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    backface-visibility: hidden;
}

.btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,255,163,0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,255,163,0.3);
}

/* Features Section */
.features {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: all 0.3s ease;
    will-change: transform;
    backface-visibility: hidden;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-hover);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.feature-desc {
    color: var(--text-light);
}

/* Energy Card Styles */
.energy-card {
    background: var(--card-bg);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 16px rgba(0,255,163,0.10);
    padding: 2rem 1rem 1.5rem 1rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    border-top: none;
}

.energy-card-header {
    background: linear-gradient(90deg, #00FFA3 0%, #01E193 100%);
    border-radius: 12px 12px 0 0;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #181c32;
    letter-spacing: 1px;
}

.energy-card-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
    align-items: flex-start;
}

.energy-card-col {
    flex: 1 1 260px;
    min-width: 220px;
}

.energy-card-col.center {
    flex: 1.2 1 320px;
    min-width: 260px;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    padding: 0 2rem;
}

.energy-select, .energy-input {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1.5px solid #00FFA3;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
}

.energy-select:focus, .energy-input:focus {
    border: 1.5px solid #01E193;
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.energy-btn-copy {
    background: linear-gradient(90deg, #00FFA3 0%, #01E193 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
    backface-visibility: hidden;
}

.energy-btn-copy:hover {
    background: linear-gradient(90deg, #01E193 0%, #00FFA3 100%);
}

.energy-btn-copy:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.energy-amount {
    color: #00FFA3;
    font-size: 1.3rem;
    font-weight: 700;
}

.energy-tag {
    background: #181c32;
    color: #fff;
    border-radius: 4px;
    padding: 0.2rem 0.7rem;
    margin-left: 0.5rem;
    font-size: 1rem;
}

.energy-tag.usdt {
    background: #e0e6ed;
    color: #181c32;
    margin-left: 0.3rem;
}

/* Language Switch */
.language-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 2rem;
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.theme-btn {
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.theme-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.theme-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.theme-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.language-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}

.language-btn.active {
    background: var(--primary);
    color: #fff;
}

.language-btn:hover {
    background: var(--primary);
    color: #fff;
}

.language-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Utility Classes */
.contact-icon,
.social-icon {
    width: 24px;
    height: 24px;
}

.text-center {
    text-align: center;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.font-bold {
    font-weight: 700;
}

.mb-12 {
    margin-bottom: 3rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.bg-gray-50 {
    background-color: var(--bg-light);
}

/* Dark mode specific styles */
[data-theme="dark"] .energy-select,
[data-theme="dark"] .energy-input {
    background: var(--card-bg);
    color: var(--text-dark);
    border-color: var(--border-color);
}

[data-theme="dark"] .energy-btn-copy {
    box-shadow: 0 2px 8px rgba(0,255,163,0.3);
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, rgba(0,255,163,0.05) 0%, rgba(1,225,147,0.05) 100%);
}

/* Animation Keyframes */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 1400px) {
    .main-layout {
        flex-direction: column;
        gap: 1rem;
    }
    
    .sidebar-ad {
        width: 100%;
        position: static;
        order: 0;
    }
    
    .sidebar-ad.left {
        order: -1;
    }
    
    .sidebar-ad.right {
        order: 1;
    }
    
    .main-content {
        order: 0;
    }
}

@media (max-width: 900px) {
    .energy-card-flex { 
        flex-direction: column; 
        gap: 1.5rem; 
    }
    
    .energy-card-col.center { 
        border: none; 
        padding: 0; 
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .navbar-menu {
        display: none;
    }
    
    .sidebar-ad {
        display: none;
    }
    
    .main-layout {
        padding: 0 1rem;
    }

    .navbar .container {
        justify-content: space-between;
    }

    .navbar-logo {
        flex: 1;
    }

    .language-switch {
        margin-left: 1rem;
        gap: 0.25rem;
    }

    .language-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .theme-switcher {
        margin-left: 0.5rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .sidebar-ad,
    .language-switch {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}