/* User Guide Styles */

:root {
    --primary-color: #1976d2;
    --secondary-color: #424242;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --code-bg: #272822;
    --code-text: #f8f8f2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1565c0 100%);
    color: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Table of Contents */
#TOC {
    background-color: var(--light-bg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

#TOC > ul {
    list-style: none;
    padding-left: 0;
}

#TOC ul ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

#TOC li {
    margin: 0.5rem 0;
}

#TOC a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

#TOC a:hover {
    text-decoration: underline;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

h2 {
    font-size: 2rem;
    color: var(--primary-color);
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.3rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

h4 {
    font-size: 1.2rem;
}

/* Paragraphs */
p {
    margin-bottom: 1rem;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

li {
    margin-bottom: 0.5rem;
}

/* Code blocks */
pre {
    background-color: var(--code-bg);
    color: var(--code-text);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

code {
    background-color: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    color: #c7254e;
}

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

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--info-color);
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

blockquote p {
    margin-bottom: 0.5rem;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    overflow-x: auto;
    display: block;
}

thead {
    background-color: var(--secondary-color);
    color: white;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

tbody tr:hover {
    background-color: #f5f5f5;
}

/* Alert boxes (styled blockquotes) */
.alert-success {
    border-left-color: var(--success-color);
    background-color: #d4edda;
    color: #155724;
}

.alert-warning {
    border-left-color: var(--warning-color);
    background-color: #fff3cd;
    color: #856404;
}

.alert-danger {
    border-left-color: var(--danger-color);
    background-color: #f8d7da;
    color: #721c24;
}

.alert-info {
    border-left-color: var(--info-color);
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Horizontal rules */
hr {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 2rem 0;
}

/* Back to top link */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background-color: #1565c0;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 1.5rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    table {
        font-size: 0.9rem;
    }
}

/* Print styles */
@media print {
    body {
        max-width: 100%;
        padding: 0;
    }
    
    header {
        background: none;
        color: black;
        border-bottom: 2px solid black;
    }
    
    .back-to-top {
        display: none;
    }
    
    a {
        color: black;
    }
    
    pre {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}
