/* Learn It Quicker - Main Stylesheet */
/* W3Schools-inspired design with ES5 JavaScript */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

:root {
    --nav-stack-height: 120px;
    --header-height: 58px;
    --topnav-bg: #0f172a;
    --topnav-text: #f8fafc;
    --topnav-hover-bg: #e2e8f0;
    --topnav-hover-text: #0f172a;
    --topnav-active-bg: #047857;
    --sidebar-bg: #f8fafc;
    --sidebar-text: #0f172a;
    --sidebar-border: #cbd5e1;
}

/* Header styles */
.header {
    background-color: #04AA6D;
    padding: 15px 0;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    padding: 0 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.logo {
    color: white;
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
}

.logo span {
    color: #ff8c00;
}

/* Navigation styles */
.topnav {
    background-color: #0f172a !important;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid #0b1220;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.4);
    opacity: 1 !important;
    display: flex;
    flex-wrap: wrap;
}

.topnav a {
    display: block;
    color: #f8fafc !important;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    opacity: 1 !important;
}

.topnav a:hover {
    background-color: #e2e8f0;
    color: #0f172a !important;
}

.topnav a.active {
    background-color: #047857;
    color: white;
}

.menu-toggle {
    display: none;
    width: 100%;
    border: none;
    background-color: #0f172a;
    color: #f8fafc;
    padding: 14px 16px;
    font-size: 17px;
    text-align: left;
    cursor: pointer;
}

.menu-toggle:focus {
    outline: 2px solid #047857;
    outline-offset: -2px;
}

/* Main content styles */
.main {
    padding: 20px;
    padding-left: 270px;
    overflow: auto;
}

/* Sidebar styles */
.sidenav {
    width: 250px;
    background-color: #f8fafc;
    padding: 20px 0;
    padding-top: 20px;
    position: fixed;
    left: 0;
    top: var(--topnav-bottom, 50px);
    bottom: 0;
    overflow-y: auto;
    border-right: 1px solid #cbd5e1;
    z-index: 50;
}

.sidenav h2 {
    padding: 0 16px 10px;
    margin: 0;
    font-size: 18px;
    color: #334155;
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 10px;
}

.sidenav a {
    padding: 8px 16px;
    text-decoration: none;
    font-size: 16px;
    display: block;
    color: #0f172a;
    border-left: 3px solid transparent;
}

.sidenav a:hover {
    background-color: #e2e8f0;
    border-left: 3px solid #04AA6D;
}

.sidenav a.active {
    background-color: #047857;
    color: white;
    border-left: 3px solid #0f172a;
}

/* Content area styles */
.content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Card styles */
.card {
    background-color: white;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #04AA6D;
    color: white;
    text-decoration: none;
    border-radius: 0;
    cursor: pointer;
    border: none;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #03985a;
}

/* Code block styles */
.code-block {
    background-color: #f4f4f4;
    padding: 15px;
    border-left: 4px solid #04AA6D;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    line-height: 1.4;
    margin: 15px 0;
    border-radius: 0;
    white-space: pre;
}

/* Syntax highlighting styles */
pre {
    margin: 15px 0;
    border-left: 4px solid #04AA6D;
    border-radius: 4px;
    overflow: hidden;
}

pre code {
    display: block;
    padding: 15px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

/* Footer styles */
.footer {
    background-color: #f1f1f1;
    padding: 20px;
    text-align: center;
    margin-top: 40px;
    border-top: 1px solid #ddd;
}

/* Tutorial content styles */
.tutorial-content h1 {
    color: #04AA6D;
    margin-bottom: 20px;
    font-size: 28px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.tutorial-content h2 {
    color: #04AA6D;
    margin: 20px 0 10px;
    font-size: 24px;
}

.tutorial-content h3 {
    color: #04AA6D;
    margin: 15px 0 10px;
    font-size: 20px;
}

.tutorial-content p {
    margin-bottom: 15px;
}

.tutorial-content ul,
.tutorial-content ol {
    margin: 15px 0 15px 20px;
}

.tutorial-content li {
    margin-bottom: 8px;
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table,
th,
td {
    border: 1px solid #ddd;
}

th,
td {
    padding: 12px;
    text-align: left;
}

th {
    background-color: #f1f1f1;
    color: #000;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Tryit button */
.tryit-btn {
    display: inline-block;
    background-color: #04AA6D;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    margin: 10px 0;
    border-radius: 0;
    font-size: 16px;
}

.tryit-btn:hover {
    background-color: #03985a;
    color: white;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .topnav {
        flex-direction: column;
    }

    .topnav a {
        display: none;
        text-align: left;
        width: 100%;
    }

    .topnav.responsive a {
        display: block;
    }

    .topnav .menu-toggle {
        display: block;
    }

    .main {
        padding-left: 20px;
    }

    .sidenav {
        width: 100%;
        position: relative;
        left: auto;
        top: auto;
        bottom: auto;
        margin-bottom: 20px;
    }

    .content {
        max-width: 100%;
    }
}