/* --- Base & Reset Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

:root {
    --bg-color: #f0f4f8;
    --text-color: #1a1a24;
    --card-bg: linear-gradient(145deg, #ffffff, #e6edf4);
    --card-text: #4a5568;
    --header-bg: #0f0f14;
    --accent-glow: 0 4px 20px rgba(0, 173, 181, 0.15);
    --card-border: #cbd5e1;
}

[data-theme="dark"] {
    --bg-color: #0d0e12;
    --text-color: #f7fafc;
    --card-bg: linear-gradient(145deg, #16171e, #1f212a);
    --card-text: #a0aec0;
    --accent-glow: 0 4px 25px rgba(0, 173, 181, 0.4);
    --card-border: #2d3748;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

header {
    background-color: var(--header-bg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 25px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-btn {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;
    z-index: 102;
}

.menu-btn span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-btn.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.brand-container {
    display: flex;
    align-items: center;
    gap: 10px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    user-select: none;
}

.apex-logo {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: #ffffff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.logo {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
}
.logo span { color: #8a929a; font-weight: 400; }

.account-btn {
    background-color: transparent;
    color: #fff;
    border: 2px solid #00adb5;
    box-shadow: 0 0 10px rgba(0, 173, 181, 0.2);
    padding: 6px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    z-index: 102;
}

.account-btn:hover {
    background-color: #00adb5;
    color: #1a1a24;
    box-shadow: var(--accent-glow);
}

.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background-color: #0b0b0f;
    padding-top: 80px;
    transition: left 0.4s cubic-bezier(0.77,0.2,0.05,1.0);
    z-index: 101;
    box-shadow: 5px 0 25px rgba(0,0,0,0.6);
}

.sidebar.active { left: 0; }
.sidebar-brand {
    padding: 10px 30px 20px 30px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #555660;
    border-bottom: 1px solid #161622;
}

.sidebar a, .sidebar button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 15px 30px;
    color: #a0aec0;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    cursor: pointer;
}

.sidebar a:hover, .sidebar button:hover {
    color: #fff;
    background-color: #12121a;
    border-left: 4px solid #00adb5;
    padding-left: 35px;
}

.toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    color: #bbb;
    border-top: 1px solid #161622;
    margin-top: 20px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider { background-color: #00adb5; }
input:checked + .slider:before { transform: translateX(21px); }

.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease; z-index: 99;
}

.overlay.active { opacity: 1; visibility: visible; }

main {
    margin-top: 60px;
    padding: 50px 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.hero {
    padding: 75px 20px;
    background: linear-gradient(135deg, #0f0f14 0%, #1a1b26 50%, #004b57 100%);
    color: white;
    border-radius: 16px;
    margin-bottom: 45px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15), var(--accent-glow);
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(0,173,181,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 { font-size: 2.8rem; margin-bottom: 18px; letter-spacing: -0.5px; }
.hero p { font-size: 1.15rem; color: #cbd5e1; max-width: 650px; margin: 0 auto 30px auto; line-height: 1.6; }

.cta-btn {
    display: inline-block;
    background: linear-gradient(90deg, #00adb5, #0077b6);
    color: white;
    padding: 14px 36px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 173, 181, 0.4);
    transition: all 0.3s ease;
}

.cta-btn:hover { 
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 173, 181, 0.6);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
    align-items: start;
}

.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    text-align: left;
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 5px;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}
.card:nth-child(1)::before { background: #00adb5; --glow-color: rgba(0, 173, 181, 0.5); }
.card:nth-child(2)::before { background: #0077b6; --glow-color: rgba(0, 119, 182, 0.5); }
.card:nth-child(3)::before { background: #9f7aea; --glow-color: rgba(159, 122, 234, 0.5); }

.card-expand-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
}
.card:nth-child(1):hover { box-shadow: 0 20px 38px rgba(0,0,0,0.12), 0 0 25px var(--glow-color); }
.card:nth-child(2):hover { box-shadow: 0 20px 38px rgba(0,0,0,0.12), 0 0 25px var(--glow-color); }
.card:nth-child(3):hover { box-shadow: 0 20px 38px rgba(0,0,0,0.12), 0 0 25px var(--glow-color); }

.card:hover .card-expand-content {
    max-height: 200px;
    opacity: 1;
    margin-top: 10px;
}

.card-expand-content ul {
    list-style: none;
    padding-left: 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-expand-content li {
    font-size: 0.92rem;
    color: var(--text-color);
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-expand-content li::before {
    content: '→';
    color: #00adb5;
    font-weight: bold;
}
.card:nth-child(2) .card-expand-content li::before { color: #0077b6; }
.card:nth-child(3) .card-expand-content li::before { color: #9f7aea; }

.card-expand-content a {
    color: inherit;
    text-decoration: none;
}
.card-expand-content a:hover {
    text-decoration: underline;
}

.card h3 { margin-bottom: 5px; font-size: 1.3rem; color: var(--text-color); font-weight: 700; }
.card p { color: var(--card-text); font-size: 0.98rem; line-height: 1.6; }
