/*
Theme Name: Minitel
Description: A retro WordPress theme inspired by the French Minitel terminal system (1982-2012). Features green phosphorescent text, scanline effects, and authentic terminal aesthetics.
Version: 1.0.0
Author: Minitel Dev Team
Tags: retro, terminal, green, monospace, vintage, blog, one-column, two-columns, custom-colors, custom-menu, editor-style, featured-images, flexible-header, post-formats, sticky-post, threaded-comments, translation-ready
Text Domain: terminal
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ==========================================================================
   Reset and Base Styles
   ========================================================================== */

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

:root {
    /* Minitel Color Palette */
    --terminal-bg: #000000;
    --terminal-text: #00ff00;
    --terminal-secondary: #ffff00;
    --terminal-accent: #ff6600;
    --terminal-border: #004400;
    --terminal-error: #ff0000;
    
    /* Typography */
    --terminal-font: 'Courier New', 'Monaco', 'Menlo', 'Consolas', monospace;
    --terminal-font-size: 14px;
    --terminal-line-height: 1.6;
    
    /* Effects */
    --terminal-scan-line: rgba(0, 255, 0, 0.1);
    --terminal-glow: 0 0 10px rgba(0, 255, 0, 0.5);
    --terminal-glow-strong: 0 0 20px rgba(0, 255, 0, 0.8);
    
    /* Layout */
    --terminal-max-width: 1200px;
    --terminal-spacing: 20px;
    --terminal-border-radius: 4px;
}

html {
    font-size: var(--terminal-font-size);
    line-height: var(--terminal-line-height);
}

body {
    background: var(--terminal-bg);
    color: var(--terminal-text);
    font-family: var(--terminal-font);
    overflow-x: hidden;
    position: relative;
}

/* ==========================================================================
   CRT Monitor Effects
   ========================================================================== */

/* Scanline Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        transparent 50%, 
        var(--terminal-scan-line) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1000;
    animation: scanlines 0.1s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

/* Screen Glow Effect */
.terminal-screen {
    background: var(--terminal-bg);
    border: 2px solid var(--terminal-border);
    border-radius: 8px;
    padding: var(--terminal-spacing);
    margin: var(--terminal-spacing);
    box-shadow: 
        inset 0 0 20px rgba(0, 255, 0, 0.1),
        var(--terminal-glow);
    position: relative;
}

/* Screen flicker effect */
@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.98; }
}

.terminal-screen {
    animation: flicker 3s infinite;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    color: var(--terminal-secondary);
    text-shadow: var(--terminal-glow);
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--terminal-text);
    text-decoration: underline;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--terminal-secondary);
    text-shadow: var(--terminal-glow);
    text-decoration: none;
}

a:focus {
    outline: 1px dotted var(--terminal-secondary);
    outline-offset: 2px;
}

strong, b {
    color: var(--terminal-secondary);
    font-weight: bold;
}

em, i {
    font-style: italic;
    color: var(--terminal-accent);
}

code {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid var(--terminal-border);
    padding: 2px 4px;
    border-radius: var(--terminal-border-radius);
    font-family: var(--terminal-font);
    color: var(--terminal-secondary);
}

pre {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid var(--terminal-border);
    padding: 1rem;
    border-radius: var(--terminal-border-radius);
    overflow-x: auto;
    margin-bottom: 1rem;
}

blockquote {
    border-left: 3px solid var(--terminal-secondary);
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: var(--terminal-accent);
}

/* ==========================================================================
   ASCII Art and Decorative Elements
   ========================================================================== */

.ascii-border {
    border: 1px solid var(--terminal-text);
    position: relative;
    padding: 1rem;
    margin: 1rem 0;
}

.ascii-border::before {
    content: '┌─────────────────────────────────────────┐';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    color: var(--terminal-text);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
}

.ascii-border::after {
    content: '└─────────────────────────────────────────┘';
    position: absolute;
    bottom: -1px;
    left: -1px;
    right: -1px;
    color: var(--terminal-text);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
}

.ascii-separator {
    text-align: center;
    margin: 2rem 0;
    color: var(--terminal-border);
    font-size: 12px;
}

.ascii-separator::before {
    content: '▪ ◦ ▪ ◦ ▪ ◦ ▪ ◦ ▪ ◦ ▪ ◦ ▪ ◦ ▪ ◦ ▪';
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

.site-container {
    max-width: var(--terminal-max-width);
    margin: 0 auto;
    padding: 0 var(--terminal-spacing);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    padding: var(--terminal-spacing) 0;
    border-bottom: 2px solid var(--terminal-border);
    position: relative;
    transition: opacity 0.1s ease-out;
}

.site-title {
    font-size: 2rem;
    text-align: center;
    color: var(--terminal-secondary);
    text-shadow: var(--terminal-glow-strong);
    margin: 0;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.8; }
}

.site-description {
    text-align: center;
    color: var(--terminal-text);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.site-main {
    flex: 1;
    display: flex;
    gap: var(--terminal-spacing);
    padding: var(--terminal-spacing) 0;
}

.content-area {
    flex: 1;
    min-width: 0;
}

.widget-area {
    width: 300px;
    flex-shrink: 0;
}

.site-footer {
    border-top: 2px solid var(--terminal-border);
    padding: var(--terminal-spacing) 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--terminal-secondary);
    margin-top: auto;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.main-navigation {
    margin-top: var(--terminal-spacing);
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--terminal-spacing);
}

.nav-menu li {
    position: relative;
}


.nav-menu a {
    text-decoration: none;
    color: var(--terminal-text);
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    display: block;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    background: var(--terminal-text);
    color: var(--terminal-bg);
    border-color: var(--terminal-text);
    box-shadow: var(--terminal-glow);
}

/* Mobile Navigation Toggle */
.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--terminal-text);
    color: var(--terminal-text);
    padding: 0.5rem 1rem;
    font-family: var(--terminal-font);
    cursor: pointer;
    margin: 0 auto;
}

.menu-toggle:hover {
    background: var(--terminal-text);
    color: var(--terminal-bg);
}

/* ==========================================================================
   Posts and Pages
   ========================================================================== */

.post,
.page {
    margin-bottom: 3rem;
    padding: var(--terminal-spacing);
    border: 1px solid var(--terminal-border);
    background: rgba(0, 68, 0, 0.05);
    border-radius: var(--terminal-border-radius);
}

.entry-header {
    margin-bottom: 1.5rem;
}

.entry-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    animation: typewriter 2s steps(40) 1s forwards;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--terminal-text);
    width: 0;
}

@keyframes typewriter {
    to { 
        width: 100%; 
        border-right: none;
    }
}

.entry-title a {
    text-decoration: none;
    color: var(--terminal-secondary);
}

.entry-meta {
    color: var(--terminal-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.entry-meta::before {
    content: '▪ ';
}

.entry-content {
    margin-bottom: 1.5rem;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--terminal-border);
    border-radius: var(--terminal-border-radius);
}

.entry-footer {
    border-top: 1px solid var(--terminal-border);
    padding-top: 1rem;
    font-size: 0.9rem;
}

.post-navigation {
    margin: 2rem 0;
    padding: 1rem;
    border: 1px solid var(--terminal-border);
    background: rgba(0, 68, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-navigation a {
    text-decoration: none;
    color: var(--terminal-text);
    padding: 0.5rem 1rem;
    border: 1px solid var(--terminal-border);
    transition: all 0.3s ease;
}

.post-navigation a:hover {
    background: var(--terminal-text);
    color: var(--terminal-bg);
}

/* ==========================================================================
   Widgets
   ========================================================================== */

.widget {
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid var(--terminal-border);
    background: rgba(0, 68, 0, 0.03);
    border-radius: var(--terminal-border-radius);
}

.widget-title {
    font-size: 1.2rem;
    color: var(--terminal-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    text-shadow: var(--terminal-glow);
}

.widget ul {
    list-style: none;
}

.widget li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.widget li::before {
    content: '▸ ';
    position: absolute;
    left: 0;
    color: var(--terminal-secondary);
}

.widget a {
    text-decoration: none;
    color: var(--terminal-text);
    transition: color 0.3s ease;
}

.widget a:hover {
    color: var(--terminal-secondary);
}

/* ==========================================================================
   Forms
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea,
select {
    background: var(--terminal-bg);
    border: 1px solid var(--terminal-text);
    color: var(--terminal-text);
    padding: 0.75rem;
    font-family: var(--terminal-font);
    font-size: var(--terminal-font-size);
    border-radius: var(--terminal-border-radius);
    width: 100%;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--terminal-secondary);
    box-shadow: var(--terminal-glow);
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.terminal-button {
    background: transparent;
    border: 1px solid var(--terminal-text);
    color: var(--terminal-text);
    padding: 0.75rem 1.5rem;
    font-family: var(--terminal-font);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: var(--terminal-border-radius);
    text-decoration: none;
    display: inline-block;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.terminal-button:hover {
    background: var(--terminal-text);
    color: var(--terminal-bg);
    box-shadow: var(--terminal-glow);
}

/* Search Form */
.search-form {
    position: relative;
    margin-bottom: var(--terminal-spacing);
}

.search-field {
    padding-right: 3rem;
}

.search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--terminal-text);
    color: var(--terminal-bg);
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: var(--terminal-font);
    border-radius: var(--terminal-border-radius);
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area {
    margin-top: 3rem;
    padding: var(--terminal-spacing);
    border: 1px solid var(--terminal-border);
    background: rgba(0, 68, 0, 0.03);
    border-radius: var(--terminal-border-radius);
}

.comments-title {
    color: var(--terminal-secondary);
    margin-bottom: 1.5rem;
}

.comment-list {
    list-style: none;
}

.comment {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--terminal-border);
    background: rgba(0, 68, 0, 0.05);
    border-radius: var(--terminal-border-radius);
}

.comment-author {
    color: var(--terminal-secondary);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.comment-meta {
    font-size: 0.8rem;
    color: var(--terminal-accent);
    margin-bottom: 0.5rem;
}

.comment-content {
    margin-bottom: 0.5rem;
}

.reply {
    font-size: 0.8rem;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.page-numbers {
    padding: 0.5rem 1rem;
    border: 1px solid var(--terminal-text);
    color: var(--terminal-text);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: var(--terminal-border-radius);
}

.page-numbers:hover,
.page-numbers.current {
    background: var(--terminal-text);
    color: var(--terminal-bg);
}

.page-numbers.prev,
.page-numbers.next {
    font-weight: bold;
}

/* ==========================================================================
   Special Effects and Animations
   ========================================================================== */

/* Loading Animation */
.loading {
    display: inline-block;
    position: relative;
}

.loading::after {
    content: '';
    animation: loading 1s infinite;
}

@keyframes loading {
    0% { content: '⣷'; }
    12.5% { content: '⣯'; }
    25% { content: '⣟'; }
    37.5% { content: '⡿'; }
    50% { content: '⢿'; }
    62.5% { content: '⣻'; }
    75% { content: '⣽'; }
    87.5% { content: '⣾'; }
    100% { content: '⣷'; }
}

/* Glitch Effect for Errors */
.glitch {
    animation: glitch 0.3s infinite;
}

@keyframes glitch {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    60% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
}

/* Boot-up Animation */
.boot-up {
    animation: boot-up 3s ease-in-out;
}

@keyframes boot-up {
    0% { 
        opacity: 0; 
        transform: scale(0.8); 
    }
    50% { 
        opacity: 0.5; 
        transform: scale(1.05); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1); 
    }
}

/* ==========================================================================
   Plugin Compatibility & Overrides
   ========================================================================== */

/* Simple Author Box Plugin - Force terminal styling */
.saboxplugin-wrap,
.saboxplugin-tab,
.saboxplugin-gravatar,
.saboxplugin-authorname,
.saboxplugin-desc,
.clearfix,
.sab-edit-settings,
.saboxplugin-socials {
    background: var(--terminal-bg) !important;
    color: var(--terminal-text) !important;
    border-color: var(--terminal-border) !important;
}

/* Author box container styling */
.saboxplugin-wrap {
    border: 1px solid var(--terminal-border) !important;
    border-radius: var(--terminal-border-radius) !important;
    padding: 1rem !important;
    margin: 1rem 0 !important;
    box-shadow: none !important;
}

/* Author box links */
.saboxplugin-wrap a {
    color: var(--terminal-secondary) !important;
    text-decoration: none !important;
}

.saboxplugin-wrap a:hover {
    color: var(--terminal-accent) !important;
    text-decoration: underline !important;
}

/* Social icons in author box */
.saboxplugin-socials a {
    background: transparent !important;
    border: 1px solid var(--terminal-text) !important;
    color: var(--terminal-text) !important;
    padding: 0.25rem 0.5rem !important;
    margin: 0.125rem !important;
    font-size: 0.8rem !important;
}

.saboxplugin-socials a:hover {
    background: var(--terminal-text) !important;
    color: var(--terminal-bg) !important;
}

/* Generic plugin compatibility */
.wp-block-group,
.wp-block-columns,
.wp-block-column {
    background: transparent !important;
}

/* Other common plugins */
.wp-block-quote,
.wp-block-pullquote,
.wp-block-group__inner-container,
.author-bio,
.author-info,
.post-author,
.related-posts-container,
.widget-area .widget {
    background: transparent !important;
}

/* Yoast SEO compatibility */
.yoast-breadcrumb,
.breadcrumb {
    background: transparent !important;
    color: var(--terminal-text) !important;
}

/* Contact Form 7 compatibility */
.wpcf7-form {
    background: transparent !important;
}

.wpcf7-form input,
.wpcf7-form textarea,
.wpcf7-form select {
    background: var(--terminal-bg) !important;
    border: 1px solid var(--terminal-border) !important;
    color: var(--terminal-text) !important;
}

/* Override any inline gray backgrounds */
*[style*="background-color: #f"] {
    background-color: var(--terminal-bg) !important;
}

*[style*="background: #f"] {
    background: var(--terminal-bg) !important;
}

*[style*="background-color: gray"],
*[style*="background-color: grey"],
*[style*="background: gray"],
*[style*="background: grey"] {
    background: var(--terminal-bg) !important;
}

/* Force black background on all WordPress pages */
.page,
.single,
.home,
.archive,
.search,
.error404 {
    background: var(--terminal-bg) !important;
}

/* Override any WordPress core styles */
.wp-site-blocks,
.wp-block-group,
.wp-block-cover,
.wp-block-columns,
.wp-block-column,
.has-background {
    background: transparent !important;
    background-color: transparent !important;
}

/* Sample page specific */
.page-id-2,
.page-template-default {
    background: var(--terminal-bg) !important;
}

/* Body and html override */
body,
html {
    background: var(--terminal-bg) !important;
    background-color: var(--terminal-bg) !important;
}

/* All containers */
.container,
.main-content,
.content-wrapper,
.page-content,
.entry-content {
    background: transparent !important;
}

/* WordPress default classes that might have gray backgrounds */
.wp-block-separator,
.wp-block-spacer,
.wp-block-media-text,
.wp-block-latest-posts,
.wp-block-latest-comments {
    background: transparent !important;
}

/* Override common gray/white background colors */
*[style*="background-color: #fff"],
*[style*="background-color: #ffffff"],
*[style*="background-color: white"],
*[style*="background: #fff"],
*[style*="background: #ffffff"],
*[style*="background: white"],
*[style*="background-color: #f5f5f5"],
*[style*="background-color: #f0f0f0"],
*[style*="background-color: #eeeeee"],
*[style*="background-color: #e5e5e5"],
*[style*="background-color: #ddd"],
*[style*="background-color: #ccc"],
*[style*="background: #f5f5f5"],
*[style*="background: #f0f0f0"],
*[style*="background: #eeeeee"],
*[style*="background: #e5e5e5"],
*[style*="background: #ddd"],
*[style*="background: #ccc"] {
    background: var(--terminal-bg) !important;
    background-color: var(--terminal-bg) !important;
}

/* Catch-all for any element with a light background */
.has-white-background-color,
.has-light-gray-background-color,
.has-very-light-gray-background-color {
    background-color: var(--terminal-bg) !important;
}

/* ==========================================================================
   Mobile Accessibility & Touch Targets
   ========================================================================== */

/* Read More Button */
.read-more-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    margin: 0.5rem 0;
    background: transparent;
    border: 1px solid var(--terminal-text);
    color: var(--terminal-text);
    text-decoration: none;
    font-family: var(--terminal-font);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px; /* WCAG AA minimum touch target */
    line-height: 1.2;
}

.read-more-button:hover,
.read-more-button:focus {
    background: var(--terminal-text);
    color: var(--terminal-bg);
    box-shadow: var(--terminal-glow);
}

/* Share Buttons */
.share-button {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    margin: 0.25rem;
    background: transparent;
    border: 1px solid var(--terminal-text);
    color: var(--terminal-text);
    text-decoration: none;
    font-family: var(--terminal-font);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px; /* WCAG AA minimum touch target */
    line-height: 1.2;
    text-align: center;
    font-size: 0.85rem;
}

.share-button:hover,
.share-button:focus {
    background: var(--terminal-text);
    color: var(--terminal-bg);
    box-shadow: var(--terminal-glow);
}

/* Sharing buttons container */
.sharing-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
    align-items: center;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --terminal-font-size: 13px;
        --terminal-spacing: 15px;
    }
    
    .terminal-screen {
        margin: 10px 0;
        padding: 15px;
    }
    
    .site-container {
        padding: 0 15px;
    }
    
    /* Enhanced mobile accessibility */
    .read-more-button {
        padding: 1rem 1.5rem;
        min-height: 48px; /* Larger touch target for mobile */
        font-size: 1rem;
        width: 100%;
        margin: 1rem 0;
        text-align: center;
    }
    
    .share-button {
        padding: 0.6rem 0.9rem;
        min-height: 48px; /* Larger touch target for mobile */
        margin: 0.25rem;
        font-size: 0.8rem;
    }
    
    .sharing-buttons {
        justify-content: center;
        gap: 0.5rem;
        margin: 0.75rem 0;
    }
    
    /* Menu items mobile accessibility */
    .nav-menu a {
        padding: 1rem 1.5rem;
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    /* Form elements accessibility */
    button,
    input[type="button"],
    input[type="reset"],
    input[type="submit"],
    .terminal-button {
        min-height: 48px;
        padding: 1rem 1.5rem;
    }
    
    .site-main {
        flex-direction: column;
    }
    
    .widget-area {
        width: 100%;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: center;
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .entry-title {
        font-size: 1.4rem;
        animation: none;
        width: auto;
        white-space: normal;
        border-right: none;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.2rem; }
    h4 { font-size: 1.1rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.9rem; }
}

@media (max-width: 480px) {
    :root {
        --terminal-font-size: 12px;
        --terminal-spacing: 10px;
    }
    
    /* Extra small screens - even larger touch targets */
    .read-more-button {
        padding: 1.25rem 1.5rem;
        min-height: 52px;
        font-size: 1.1rem;
    }
    
    .share-button {
        padding: 0.75rem 1rem;
        min-height: 52px;
        margin: 0.25rem;
        font-size: 0.85rem;
    }
    
    .nav-menu a {
        padding: 1.25rem 1.5rem;
        min-height: 52px;
        font-size: 1rem;
    }
    
    button,
    input[type="button"],
    input[type="reset"],
    input[type="submit"],
    .terminal-button {
        min-height: 52px;
        padding: 1.25rem 1.5rem;
    }
    
    .ascii-border::before,
    .ascii-border::after {
        content: '┌─────────────────┐';
        font-size: 10px;
    }
    
    .ascii-border::after {
        content: '└─────────────────┘';
    }
}

/* ==========================================================================
   Admin Bar Compatibility
   ========================================================================== */

body.admin-bar .terminal-screen {
    margin-top: 52px;
}

@media (max-width: 782px) {
    body.admin-bar .terminal-screen {
        margin-top: 66px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    body::before,
    .terminal-screen {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .site-header,
    .main-navigation,
    .widget-area,
    .site-footer {
        display: none;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--terminal-bg);
    border: 2px solid var(--terminal-secondary);
    clip: auto !important;
    clip-path: none;
    color: var(--terminal-secondary);
    display: block;
    font-size: 0.875rem;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Focus indicators */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid var(--terminal-secondary);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    body::before {
        animation: none;
    }
}
