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

body {
    font-family: 'Courier New', 'Monaco', 'Consolas', monospace;
    background: #000000;
    color: #00ff00;
    height: 100vh;
    overflow: hidden;
    text-shadow: 0 0 5px #00ff00;
    animation: scanlines 2s linear infinite;
}

@keyframes scanlines {
    0% { background-position: 0 0; }
    100% { background-position: 0 4px; }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 98%, #00ff0020 100%);
    background-size: 4px 4px;
    pointer-events: none;
    z-index: 1000;
}

.docs-container {
    display: flex;
    height: 100vh;
    background: #000000;
    border: 2px solid #00ff00;
    position: relative;
}

.docs-container::before {
    content: 'CRONO TERMINAL v1.0.1 - DOCUMENTATION SYSTEM';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #00ff00;
    color: #000000;
    padding: 2px 10px;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    z-index: 100;
    opacity: 1;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: #000000;
    border-right: 2px solid #00ff00;
    padding: 30px 0 20px;
    overflow-y: auto;
    position: relative;
}

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
    background: #00ff00;
    color: #000000;
    border: 2px solid #00ff00;
    padding: 8px 12px;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.mobile-menu-toggle:hover {
    background: #000000;
    color: #00ff00;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
}

.sidebar::before {
    content: '> NAVIGATION MENU';
    position: absolute;
    top: 5px;
    left: 20px;
    font-size: 10px;
    color: #00ff00;
    opacity: 0.7;
    letter-spacing: 1px;
}

.logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #00ff00;
    margin-bottom: 20px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.logo .version {
    font-size: 12px;
    color: #00ff0080;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    list-style: none;
    padding: 0 20px;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #00ff0080;
    text-decoration: none;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0;
}

.nav-link:hover,
.nav-link.active {
    color: #00ff00;
    background: #00ff0020;
    border-color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

.nav-link i {
    width: 16px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px 40px 20px;
    overflow-y: auto;
    position: relative;
}

.main-content::before {
    content: '> DOCUMENTATION VIEWER';
    position: absolute;
    top: 5px;
    left: 40px;
    font-size: 10px;
    color: #00ff00;
    opacity: 0.7;
    letter-spacing: 1px;
}

.section-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #00ff00;
}

.section-title {
    font-size: 28px;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-subtitle {
    font-size: 14px;
    color: #00ff0080;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h2 {
    font-size: 20px;
    color: #00ff00;
    margin: 30px 0 15px;
    text-shadow: 0 0 5px #00ff00;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

h3 {
    font-size: 16px;
    color: #00ff00;
    margin: 20px 0 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

p {
    line-height: 1.6;
    margin-bottom: 15px;
    color: #00ff00;
    text-shadow: 0 0 3px #00ff00;
}

ul, ol {
    margin: 15px 0;
    padding-left: 30px;
}

li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #00ff00;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.feature-card {
    background: #000000;
    border: 2px solid #00ff00;
    padding: 20px;
    border-radius: 0;
    transition: all 0.2s ease;
}

.feature-card:hover {
    background: #00ff0010;
    box-shadow: 0 0 15px #00ff0050;
}

.feature-title {
    font-size: 16px;
    color: #00ff00;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-description {
    font-size: 14px;
    color: #00ff0080;
    line-height: 1.5;
}

.code-block {
    background: #000000;
    border: 2px solid #00ff00;
    border-radius: 0;
    padding: 15px;
    font-family: 'Courier New', monospace;
    color: #00ff00;
    overflow-x: auto;
    margin: 15px 0;
    text-shadow: 0 0 3px #00ff00;
    white-space: pre-wrap;
    word-break: break-word;
}

.warning-box {
    background: #ff000020;
    border: 2px solid #ff0000;
    border-radius: 0;
    padding: 15px;
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #ff0000;
    text-shadow: 0 0 5px #ff0000;
}

.info-box {
    background: #00ff0020;
    border: 2px solid #00ff00;
    border-radius: 0;
    padding: 15px;
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

.step-list {
    counter-reset: step-counter;
}

.step-item {
    counter-increment: step-counter;
    margin-bottom: 20px;
    padding: 15px;
    border: 2px solid #00ff00;
    background: #000000;
    position: relative;
}

.step-item::before {
    content: "STEP " counter(step-counter);
    position: absolute;
    top: -2px;
    left: 15px;
    background: #00ff00;
    color: #000000;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
}

.step-title {
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.requirement-item {
    background: #000000;
    border: 2px solid #00ff00;
    padding: 15px;
    text-align: center;
}

.requirement-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.requirement-value {
    font-size: 12px;
    color: #00ff0080;
    text-transform: uppercase;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000000;
    border: 1px solid #00ff0050;
}

::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: #00ff0080;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: block;
    }

    .docs-container {
        flex-direction: column;
        border: 1px solid #00ff00;
        height: 100vh;
        padding-top: 50px;
    }

    .docs-container::before {
        font-size: 9px;
        padding: 1px 5px;
        top: 50px;
    }

    .sidebar {
        position: fixed;
        top: 50px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 50px);
        max-height: none;
        border-right: 2px solid #00ff00;
        border-bottom: none;
        padding: 15px 0 10px;
        overflow-y: auto;
        transition: left 0.3s ease;
        z-index: 1000;
        background: #000000;
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        padding: 20px;
        height: calc(100vh - 50px);
        overflow-y: auto;
        width: 100%;
    }

    .main-content .section-header {
        margin-top: 25px;
        margin-bottom: 30px;
    }

    .sidebar::before {
        font-size: 8px;
        left: 10px;
    }

    .logo {
        padding: 10px;
        margin-bottom: 10px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .logo .version {
        font-size: 10px;
    }

    .nav-menu {
        padding: 0 10px;
    }

    .nav-link {
        padding: 8px 10px;
        font-size: 12px;
        gap: 8px;
    }

    .nav-link i {
        width: 14px;
    }

    .main-content {
        padding: 15px 20px 10px;
        height: calc(100vh - 40vh);
        overflow-y: auto;
    }

    .main-content::before {
        font-size: 8px;
        left: 20px;
    }

    .section-title {
        font-size: 22px;
        gap: 10px;
    }

    .section-subtitle {
        font-size: 12px;
    }

    h2 {
        font-size: 18px;
        margin: 20px 0 10px;
        gap: 8px;
    }

    h3 {
        font-size: 14px;
        margin: 15px 0 8px;
    }

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

    .feature-card {
        padding: 15px;
    }

    .feature-title {
        font-size: 14px;
        gap: 8px;
    }

    .feature-description {
        font-size: 12px;
    }

    .requirements-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .requirement-item {
        padding: 10px;
    }

    .requirement-title {
        font-size: 12px;
    }

    .requirement-value {
        font-size: 10px;
    }

    .step-item {
        padding: 10px;
        margin-bottom: 15px;
    }

    .step-item::before {
        font-size: 8px;
        padding: 1px 6px;
        left: 10px;
    }

    .step-title {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .code-block {
        padding: 10px;
        font-size: 12px;
        margin: 10px 0;
    }

    .info-box, .warning-box {
        padding: 10px;
        margin: 15px 0;
        font-size: 12px;
    }

    .info-box i, .warning-box i {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 12px;
    }

    .mobile-menu-toggle {
        padding: 6px 10px;
        font-size: 14px;
        top: 5px;
        left: 5px;
    }

    .docs-container {
        border: none;
        height: 100vh;
        padding-top: 40px;
    }

    .docs-container::before {
        font-size: 8px;
        padding: 1px 3px;
        text-align: center;
        top: 40px;
    }

    .sidebar {
        top: 40px;
        height: calc(100vh - 40px);
        width: 100%;
        left: -100%;
        padding: 10px 0 5px;
    }

    .main-content {
        height: calc(100vh - 40px);
    }

    .main-content .section-header {
        margin-top: 15px;
    }

    .sidebar::before {
        font-size: 7px;
        left: 5px;
    }

    .logo {
        padding: 5px;
        margin-bottom: 5px;
    }

    .logo h1 {
        font-size: 16px;
        margin-bottom: 3px;
    }

    .logo .version {
        font-size: 8px;
    }

    .nav-menu {
        padding: 0 5px;
    }

    .nav-link {
        padding: 6px 8px;
        font-size: 10px;
        gap: 6px;
    }

    .nav-link i {
        width: 12px;
        font-size: 10px;
    }

    .main-content {
        padding: 10px 15px 5px;
        height: calc(100vh - 35vh);
    }

    .main-content::before {
        font-size: 7px;
        left: 15px;
    }

    .section-header {
        margin-bottom: 20px;
        padding-bottom: 10px;
    }

    .section-title {
        font-size: 18px;
        gap: 8px;
        margin-bottom: 8px;
    }

    .section-subtitle {
        font-size: 10px;
    }

    h2 {
        font-size: 16px;
        margin: 15px 0 8px;
        gap: 6px;
    }

    h3 {
        font-size: 12px;
        margin: 12px 0 6px;
    }

    p, li {
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 10px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 15px 0;
    }

    .feature-card {
        padding: 10px;
    }

    .feature-title {
        font-size: 12px;
        gap: 6px;
        margin-bottom: 6px;
    }

    .feature-description {
        font-size: 11px;
        line-height: 1.3;
    }

    .requirements-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .requirement-item {
        padding: 8px;
    }

    .requirement-title {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .requirement-value {
        font-size: 9px;
    }

    .step-list {
        margin: 15px 0;
    }

    .step-item {
        padding: 8px;
        margin-bottom: 10px;
    }

    .step-item::before {
        font-size: 7px;
        padding: 1px 4px;
        left: 8px;
    }

    .step-title {
        font-size: 11px;
        margin-bottom: 4px;
        margin-top: 8px;
    }

    .code-block {
        padding: 8px;
        font-size: 10px;
        margin: 8px 0;
        overflow-x: auto;
        white-space: pre;
        word-break: normal;
    }

    .info-box, .warning-box {
        padding: 8px;
        margin: 10px 0;
        font-size: 11px;
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .info-box i, .warning-box i {
        font-size: 12px;
        align-self: flex-start;
    }

    .info-box div, .warning-box div {
        line-height: 1.3;
    }

    ul, ol {
        padding-left: 20px;
        margin: 10px 0;
    }

    li {
        margin-bottom: 6px;
    }

    /* Improve scrollbar on mobile */
    ::-webkit-scrollbar {
        width: 4px;
    }

    ::-webkit-scrollbar-thumb {
        background: #00ff00;
        border-radius: 2px;
    }
}

/* Landscape mobile adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 250px;
        height: 100vh;
    }

    .main-content {
        height: 100vh;
    }
}

/* Touch-friendly improvements for all mobile sizes */
@media (max-width: 1024px) {
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    button, .nav-link, .feature-card {
        touch-action: manipulation;
    }

    /* Prevent zoom on input focus */
    input, select, textarea {
        font-size: 16px;
    }
}
