/* ============================================
   Micko Documentation - Envato Style
   ============================================ */

/* CSS Variables for Theme Support */
:root {
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --border-color: #dee2e6;
    --accent-color: #007bff;
    --accent-hover: #0056b3;
    --sidebar-bg: #2c3e50;
    --sidebar-text: #ecf0f1;
    --sidebar-hover: #34495e;
    --code-bg: #f8f9fa;
    --code-text: #e83e8c;
    --code-border: #e9ecef;
    --success-bg: #d4edda;
    --success-text: #155724;
    --warning-bg: #fff3cd;
    --warning-text: #856404;
    --info-bg: #d1ecf1;
    --info-text: #0c5460;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Dark Theme Colors */
[data-theme="dark"] {
    --bg-primary: #1a1d23;
    --bg-secondary: #23272f;
    --bg-tertiary: #2c3139;
    --text-primary: #e9ecef;
    --text-secondary: #adb5bd;
    --text-muted: #6c757d;
    --border-color: #3a3f47;
    --accent-color: #4dabf7;
    --accent-hover: #339af0;
    --sidebar-bg: #1e2329;
    --sidebar-text: #e9ecef;
    --sidebar-hover: #2c3139;
    --code-bg: #23272f;
    --code-text: #ff6b9d;
    --code-border: #3a3f47;
    --success-bg: #1e4620;
    --success-text: #8fd99c;
    --warning-bg: #5c4a00;
    --warning-text: #ffd43b;
    --info-bg: #0c5460;
    --info-text: #7dd3fc;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

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

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9em;
    background-color: var(--code-bg);
    color: var(--code-text);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    border: 1px solid var(--code-border);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-md);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--sidebar-bg);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--sidebar-hover);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #4a5568;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--sidebar-hover) 100%);
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--sidebar-text);
    margin-bottom: 0.25rem;
}

.tagline {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

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

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

.sidebar-nav li {
    margin: 0;
}

.nav-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 0.9375rem;
}

.nav-link:hover {
    background-color: var(--sidebar-hover);
    border-left-color: var(--accent-color);
    color: #ffffff;
}

.nav-link.active {
    background-color: var(--sidebar-hover);
    border-left-color: var(--accent-color);
    color: #ffffff;
    font-weight: 500;
}

.dark-light-mode-toggle {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
}

.theme-toggle {
    background: var(--sidebar-hover);
    border: none;
    color: var(--sidebar-text);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
    background: #4a5568;
    transform: scale(1.1);
}

/* Main Content */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    background-color: var(--bg-primary);
    transition: margin-left 0.3s ease;
}

.doc-section {
    padding: 3rem 0;
    max-width: 900px;
    margin: 0 auto;
}

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

ul li, ol li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.feature-list li {
    margin-bottom: 0.75rem;
}

.feature-list strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Code Blocks */
.code-block {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.code-header {
    background-color: var(--bg-tertiary);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.copy-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8125rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.copy-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.copied {
    background: #28a745;
}

pre {
    margin: 0;
    padding: 1.5rem;
    background-color: var(--code-bg);
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-primary);
    font-size: inherit;
}

/* Tables */
.requirements-table {
    margin: 1.5rem 0;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background-color: var(--bg-tertiary);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

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

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

/* Info Boxes */
.info-box,
.success-box,
.warning-box {
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.info-box {
    background-color: var(--info-bg);
    border-left-color: #0c5460;
    color: var(--info-text);
}

.info-box h3 {
    color: var(--info-text);
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.success-box {
    background-color: var(--success-bg);
    border-left-color: #28a745;
    color: var(--success-text);
}

.success-box strong {
    color: var(--success-text);
}

.warning-box {
    background-color: var(--warning-bg);
    border-left-color: #ffc107;
    color: var(--warning-text);
}

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

.warning-box ul {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

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

.note {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

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

.support-card {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.support-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.support-card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.support-card p {
    margin-bottom: 0.5rem;
}

/* Thank You Section */
.thank-you-content {
    text-align: left;
    padding: 2rem 0;
}

.signature {
    margin-top: 2rem;
    font-size: 1.125rem;
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .container {
        padding: 0 1.5rem;
    }

    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1001;
        background: var(--accent-color);
        color: white;
        border: none;
        width: 45px;
        height: 45px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        cursor: pointer;
        box-shadow: var(--shadow-md);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.375rem;
    }

    .doc-section {
        padding: 2rem 0;
    }

    .container {
        padding: 0 1rem;
    }

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

    .code-block {
        margin: 1rem 0;
    }

    pre {
        padding: 1rem;
        font-size: 0.8125rem;
    }

    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
    }

    h1 {
        font-size: 1.75rem;
    }

    .code-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .copy-btn {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .theme-toggle,
    .copy-btn,
    .mobile-menu-toggle {
        display: none;
    }

    .doc-section {
        page-break-inside: avoid;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
.nav-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background-color: var(--accent-color);
    color: white;
}

::-moz-selection {
    background-color: var(--accent-color);
    color: white;
}

