/* Root Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #1abc9c;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-bg: #ecf0f1;
    --dark-bg: #34495e;
    --text-color: #2c3e50;
    --light-text: #7f8c8d;
    --border-color: #bdc3c7;
    --code-bg: #f4f4f4;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --body-bg: #ffffff;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --primary-color: #1abc9c;
    --secondary-color: #16a085;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-bg: #2c3e50;
    --dark-bg: #1a252f;
    --text-color: #ecf0f1;
    --light-text: #95a5a6;
    --border-color: #34495e;
    --code-bg: #1a252f;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    --card-bg: #34495e;
    --body-bg: #2c3e50;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--body-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-bg) 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-text {
    flex: 1;
    min-width: 200px;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header .subtitle {
    font-size: 1.25rem;
    color: var(--light-bg);
    font-weight: 300;
}

.header-badges {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.badge:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* Theme Toggle Button */
.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1) rotate(15deg);
}

.theme-toggle:active {
    transform: scale(0.95) rotate(0deg);
}

.theme-icon {
    width: 24px;
    height: 24px;
    filter: invert(1);
    transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-icon {
    filter: invert(0);
}

/* Navigation */
nav {
    background-color: var(--secondary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    display: block;
    padding: 15px 18px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav ul li a:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

nav ul li a:hover::after {
    width: 80%;
}

/* Main Content */
main {
    padding: 40px 20px;
}

section {
    margin-bottom: 60px;
}

section h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--secondary-color);
    position: relative;
    transition: color 0.3s ease;
}

section h2::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
}

section h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

section h4 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-top: 20px;
    margin-bottom: 10px;
}

section p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--secondary-color);
}

.feature-card h3 {
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.feature-card p {
    margin: 0;
    color: var(--light-text);
}

/* Info Boxes */
.info-box,
.warning-box,
.tip-box,
.step-box {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid;
    transition: all 0.3s ease;
    background-color: var(--card-bg);
}

.info-box:hover,
.warning-box:hover,
.tip-box:hover,
.step-box:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.info-box {
    border-color: var(--secondary-color);
}

.warning-box {
    border-color: var(--warning-color);
}

.tip-box {
    border-color: var(--success-color);
}

.step-box {
    border-color: var(--primary-color);
}

.info-box h3,
.warning-box h3,
.tip-box h3,
.step-box h3,
.step-box h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* Lists */
ul, ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

ul li, ol li {
    margin-bottom: 8px;
}

.numbered-list {
    counter-reset: item;
    list-style: none;
    margin-left: 0;
}

.numbered-list li {
    counter-increment: item;
    margin-bottom: 15px;
    position: relative;
    padding-left: 35px;
}

.numbered-list li::before {
    content: counter(item);
    background-color: var(--secondary-color);
    color: white;
    font-weight: bold;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
    top: 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    transition: background-color 0.3s ease;
}

table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

table tbody tr:hover {
    background-color: var(--light-bg);
}

table tbody tr:last-child {
    border-bottom: none;
}

/* Code */
code {
    background-color: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: var(--accent-color);
    transition: background-color 0.3s ease;
    border: 1px solid var(--border-color);
}

pre {
    background-color: var(--code-bg);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    border-left: 4px solid var(--secondary-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

pre:hover {
    border-left-color: var(--accent-color);
}

pre code {
    background-color: transparent;
    padding: 0;
    color: var(--text-color);
    border: none;
}

/* Links */
a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

a:hover {
    color: var(--primary-color);
}

main a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transition: width 0.3s ease;
}

main a:hover::after {
    width: 100%;
}

/* FAQ Items */
.faq-item {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.faq-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--secondary-color);
}

.faq-item h4 {
    margin-top: 0;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.faq-item ul,
.faq-item p {
    margin-bottom: 0;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-bg) 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
}

footer p {
    margin: 5px 0;
}

footer a {
    color: var(--light-bg);
    transition: all 0.3s ease;
}

footer a:hover {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

footer a::after {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    header .subtitle {
        font-size: 1rem;
    }

    .header-content {
        justify-content: center;
    }

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

    .theme-toggle {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li a {
        padding: 12px 20px;
    }

    section h2 {
        font-size: 1.5rem;
    }

    section h3 {
        font-size: 1.25rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.9rem;
    }

    table th,
    table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }

    .theme-icon {
        width: 20px;
        height: 20px;
    }

    nav ul li a {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    section h2 {
        font-size: 1.25rem;
    }

    .numbered-list li {
        padding-left: 30px;
    }

    .numbered-list li::before {
        width: 22px;
        height: 22px;
        font-size: 0.9rem;
    }
}
