/* Enhanced CSS for Markdown-based Words system */

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

/* General styles for headings */
h1, h2, h3 {
    color: rgb(170, 170, 12); /* Set text color to white */
    font-family: 'Roboto', sans-serif; /* Use Roboto font */
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100vh;
    background: url('/files/assets/words/img/page_t.jpg') no-repeat center center fixed;
    background-size: cover;
    color: rgb(7, 1, 22);
}

/* body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
    display: flex;
    min-height: 100vh;
} */

/* Navigation Styles */
#nav-container {
    width: 300px;
    background: #5a51513d;
    /* border-right: 1px solid #ddd; */
    padding: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

#nav-container h1 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #2c3e50;
    cursor: pointer;
    transition: color 0.3s ease;
}

#nav-container h1:hover {
    color: #3445db46;
}

.back-home {
    color: #7f8c8d;
    font-size: 1em;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.back-home:hover {
    color: #2c3e50;
}

/* Navigation List */
#nav-list {
    list-style: none;
}

#nav-list li {
    margin-bottom: 15px;
}

.nav-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.nav-link:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.nav-link.active {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.nav-link.keyboard-focus {
    outline: 2px solid #2196f3;
    outline-offset: 2px;
}

.nav-item {
    padding: 15px;
}

.nav-title {
    font-weight: bold;
    font-size: 1.1em;
    color: #2c3e50;
    margin-bottom: 5px;
}

.nav-date {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.nav-excerpt {
    font-size: 0.9em;
    color: #666;
    line-height: 1.4;
    margin-bottom: 8px;
}

.nav-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tag {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
}

/* Main Content Styles */
main {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

#page-title {
    text-align: center;
    font-family: 'Fira Mono', 'Roboto Mono', 'Courier New', Courier, monospace;
    font-size: 1.5em;
    margin-bottom: 30px;
    color: #2c3e50;
    /* border-bottom: 2px solid #3498db; */
    padding-bottom: 15px;
}

#content-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Welcome Content */
#welcome-content {
    text-align: center;
    padding: 60px 0;
}

#welcome-content p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 20px;
}

#content-stats {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

/* Markdown Content Styles */
#markdown-content {
    font-family: 'Fira Mono', 'Roboto Mono', 'Courier New', Courier, monospace;
    /* color: #2c3e50; */
    /* font-size: 14px; */
    line-height: 1;
}

#markdown-content h1,
#markdown-content h2,
#markdown-content h3,
#markdown-content h4,
#markdown-content h5,
#markdown-content h6 {
    margin: 30px 0 15px 0;
    font-family: 'Fira Mono', 'Roboto Mono', 'Courier New', Courier, monospace;
    color: #010f1c;
}

#markdown-content h1 {
    font-size: 18px;
    color: #2c3e50;
    /* border-bottom: 3px solid #00070b; */
    padding-bottom: 10px;
}

#markdown-content h2 {
    font-size: 1.8em;
    /* border-bottom: 2px solid #95a5a6; */
    padding-bottom: 8px;
}

#markdown-content h3 {
    font-size: 1.5em;
    /* color: #4ce709; */
}

#markdown-content p {
    margin-bottom: 20px;
    text-align: justify;
}

#markdown-content ul,
#markdown-content ol {
    margin: 20px 0;
    padding-left: 40px;
}

#markdown-content li {
    margin-bottom: 8px;
}

#markdown-content blockquote {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa6c;
    border-left: 4px solid #3498db;
    font-style: italic;
}

#markdown-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
}

#markdown-content pre {
    background: #2d3748;
    /* color: #e2e8f0; */
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 25px 0;
}

#markdown-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
}

#markdown-content a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px dotted #3498db;
}

#markdown-content a:hover {
    color: #2980b9;
    border-bottom: 1px solid #2980b9;
}

#markdown-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#markdown-content th,
#markdown-content td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#markdown-content th {
    background: #3498db;
    color: white;
    font-weight: bold;
}

#markdown-content tr:hover {
    background: #f8f9fa;
}

/* Loading and Error States */
#loading-indicator {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

#error-display {
    background: #e74c3c;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    #nav-container {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    main {
        padding: 20px;
    }
    
    #page-title {
        font-size: 2em;
    }
    
    #markdown-content {
        font-size: 1em;
    }
}

/* Print Styles */
@media print {
    #nav-container {
        display: none;
    }
    
    main {
        padding: 0;
    }
    
    #markdown-content {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    #markdown-content a {
        color: inherit;
        text-decoration: underline;
        border-bottom: none;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}
