/* Article Viewer Styles */

/* Theme Container */
#article-content {
    padding: 40px;
    margin: 20px auto;
    max-width: 800px;
    border-radius: 8px;
    line-height: 1.8;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

/* Theme Trigger Button */
#theme-trigger {
    position: absolute;
    top: 0;
    right: 0;
    background: transparent;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-weight: bold;
    cursor: pointer;
    font-family: serif;
    font-size: 1.2em;
    color: #e0e0e0;
    border-color: #666;
    z-index: 10;
    transition: all 0.2s;
}

#theme-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}

/* Dialog Styling */
#theme-dialog {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 20px;
    max-width: 300px;
    width: 100%;
}

#theme-dialog::backdrop {
    background: rgba(0, 0, 0, 0.3);
}

#theme-dialog h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #333;
}

.theme-options {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.theme-options button {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: transform 0.1s;
}

.theme-options button:hover {
    transform: scale(1.05);
}

.btn-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.9em;
    text-decoration: underline;
}

/* Theme: Light (Default) - Black text on White background */
.theme-light {
    background-color: #ffffff;
    color: #222222;
    border: 1px solid #eee;
}

/* Theme: Dark - White text on Black background */
.theme-dark {
    background-color: #252525;
    color: #e0e0e0;
    border: 1px solid #444;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Theme: Grey - Black text on Light Grey background */
.theme-grey {
    background-color: #f4f4f4;
    color: #333333;
    border: 1px solid #ddd;
}

/* Specific button styles for visual cue in dialog */
.btn-theme-light {
    background-color: #ffffff;
    color: #000000;
}

.btn-theme-dark {
    background-color: #000000;
    color: #ffffff;
}

.btn-theme-grey {
    background-color: #f0f0f0;
    color: #000000;
}

/* Article Metadata Styling */
.tauthor, .tdate {
    font-weight: bold;
    font-size: 0.9em;
    opacity: 0.8;
}

/* Heading Colors based on Theme */
.theme-light h1, .theme-light h2, .theme-light h3,
.theme-grey h1, .theme-grey h2, .theme-grey h3 {
    color: #111;
}

.theme-dark h1, .theme-dark h2, .theme-dark h3 {
    color: #fff;
}

h1[data-title] {
    margin-top: 0;
    margin-bottom: 0.8em;
    padding-bottom: 0.2em;
    border-bottom: 1px solid;
    font-size: 1.7rem;
}
h2  {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-size: 1.4rem;
    text-align: left;
}
#article-content a {
    text-decoration: underline;
}
h1 {
    font-size: clamp(1.5rem, 5vw + 1rem, 2.5rem);
    margin-bottom: 10px;
}