:root {
    --primary-color: #64ffda;
    --secondary-color: #82b1ff;
    --background-color: #f5f7fa;
    --text-color: #2c3e50;
    --card-bg: #ffffff;
    --sidebar-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --code-bg: #f8f9fa;
    --border-color: #e0e6ed;
    --header-height: 70px;
}

[data-theme="dark"] {
    --primary-color: #64ffda;
    --secondary-color: #536dfe;
    --background-color: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --sidebar-bg: #1e1e1e;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --code-bg: #2d2d2d;
    --border-color: #3a3a3a;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    text-align: center;
}

h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    color: var(--primary-color);
}

p {
    margin-bottom: 1rem;
    text-align: justify;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Code Blocks */
code {
    background-color: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    color: var(--primary-color);
}

pre {
    background-color: var(--code-bg);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    border-left: 4px solid var(--primary-color);
    position: relative;
}

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

/* Lists */
ul, ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    margin-right: 0.5rem;
}

/* Theme Toggle */
.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    width: 320px;
    background-color: var(--sidebar-bg);
    box-shadow: 2px 0 10px var(--shadow-color);
    z-index: 99;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

/* Navigation */
.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav > ul > li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 0.9rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: rgba(100, 255, 218, 0.1);
    border-left: 3px solid var(--primary-color);
}

.sidebar-nav i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* Nested Navigation */
.nested-nav {
    display: block;
    background-color: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .nested-nav {
    background-color: rgba(255, 255, 255, 0.03);
}

.nested-nav a {
    padding-left: 2.5rem;
    font-size: 0.85rem;
}

.nested-nav .nested-nav a {
    padding-left: 3.5rem;
    font-size: 0.8rem;
}

.nested-nav .nested-nav .nested-nav a {
    padding-left: 4.5rem;
    font-size: 0.75rem;
}

/* Sidebar Toggle */
.sidebar-toggle {
    position: fixed;
    left: 15px;
    top: calc(var(--header-height) + 15px);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px var(--shadow-color);
    z-index: 101;
    transition: transform 0.3s ease;
}

.sidebar-toggle:hover {
    transform: scale(1.1);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: calc(var(--header-height) + 2rem);
    transition: margin-left 0.3s ease;
}

/* Content Sections */
.content-section {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px var(--shadow-color);
    animation: fadeIn 0.5s ease;
}

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

.feature-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 3px solid var(--primary-color);
}

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

.feature-card h3 {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.feature-card i {
    margin-right: 0.75rem;
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 1rem;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.4);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid var(--primary-color);
    background-color: rgba(100, 255, 218, 0.1);
}

.alert.warning {
    border-left-color: #ff9800;
    background-color: rgba(255, 152, 0, 0.1);
}

.alert.error {
    border-left-color: #f44336;
    background-color: rgba(244, 67, 54, 0.1);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 98;
    display: none;
}

.overlay.active {
    display: block;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
/* Mobile (default) */
@media (max-width: 1199px) {
    .sidebar {
        width: 100%;
        left: 0;
        top: var(--header-height);
        transform: translateY(-100%);
        max-height: 60vh;
    }
    
    .sidebar.active {
        transform: translateY(0);
    }
    
    .container {
        margin-left: 20px;
        margin-right: 20px;
        padding: 1rem;
        padding-top: calc(var(--header-height) + 1rem);
    }
    
    header {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* Desktop */
@media (min-width: 1200px) {
    .sidebar {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    .container {
        margin-left: 360px;
        margin-right: 40px;
    }
}
