/* css/style.css - 2000s Retro Theme (Eye-Safe & Cohesive) */
:root {
    /* Classic Light Theme (Windows 95/98 vibe) */
    --bg-color: #008080; /* Classic Teal Desktop */
    --surface-color: #c0c0c0; /* Window Gray */
    --text-primary: #000000;
    --text-secondary: #333333;
    --textbox-bg: #ffffff; /* White backgrounds for text areas */
    --border-light: #ffffff;
    --border-dark: #808080;
    --border-darker: #000000;
    --primary-color: #000080; /* Navy Blue */
    --primary-hover: #0000ff; /* Bright Blue */
    --link-color: #0000ee;
    --title-bar-bg: #000080;
    --title-bar-text: #ffffff;
    
    /* Strong, legible badge colors for light mode */
    --badge-bg: #ffffff;
    --status-available: #007700; 
    --status-beta: #bb5500; 
    --status-coming: #880088; 
}

[data-theme="dark"] {
    /* Subtle Dark Slate/Teal Theme (Complements the Light Mode) */
    --bg-color: #002222; /* Very deep, dark teal desktop */
    --surface-color: #1e2b2b; /* Muted dark slate for windows */
    --text-primary: #d4e4e4; /* Soft, cool off-white (prevents eye strain) */
    --text-secondary: #8a9c9c; /* Muted gray-teal */
    --textbox-bg: #0b1212; /* Almost black-teal for text areas */
    --border-light: #3a4d4d; /* Subdued 3D highlight */
    --border-dark: #121a1a; /* Subdued 3D shadow */
    --border-darker: #050a0a; /* Deepest 3D shadow */
    --primary-color: #55aaaa; /* Soft retro cyan */
    --primary-hover: #ffffff;
    --link-color: #66cccc; /* Readable soft cyan for links */
    --title-bar-bg: #004040; /* Muted deep teal title bar */
    --title-bar-text: #ffffff;
    
    /* Bright but soft badge colors for dark mode */
    --badge-bg: #152222;
    --status-available: #55cc55; /* Soft neon green */
    --status-beta: #ddaa44; /* Soft warm amber */
    --status-coming: #cc66cc; /* Soft magenta */
}

/* Reset & Typography */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    /* Standard 2000s web safe fonts */
    font-family: "Verdana", "Tahoma", "Arial", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 14px;
}
a { 
    color: var(--link-color); 
    text-decoration: underline; 
}
a:hover { 
    background-color: var(--text-primary);
    color: var(--bg-color); /* Invert on hover for classic feel */
    text-decoration: none;
}
ul { list-style: square inside; margin-left: 10px; }
.container { max-width: 1000px; margin: 0 auto; padding: 0 15px; width: 100%; }

/* Window Box (The classic 3D border effect) */
.window-box {
    background-color: var(--surface-color);
    border-top: 2px solid var(--border-light);
    border-left: 2px solid var(--border-light);
    border-right: 2px solid var(--border-darker);
    border-bottom: 2px solid var(--border-darker);
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    display: inline-block; 
    padding: 4px 10px; 
    font-family: "Verdana", sans-serif;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer; 
    background-color: var(--surface-color);
    color: var(--text-primary);
    border-top: 2px solid var(--border-light);
    border-left: 2px solid var(--border-light);
    border-right: 2px solid var(--border-darker);
    border-bottom: 2px solid var(--border-darker);
    text-decoration: none;
}
.btn:active {
    border-top: 2px solid var(--border-darker);
    border-left: 2px solid var(--border-darker);
    border-right: 2px solid var(--border-light);
    border-bottom: 2px solid var(--border-light);
    padding: 5px 9px 3px 11px; /* Shift text to simulate press */
}
.btn:hover {
    color: var(--text-primary);
    background-color: var(--surface-color);
}
.btn:disabled, .btn.disabled { 
    color: var(--border-dark); 
    cursor: not-allowed; 
}

/* Navbar */
header { margin-top: 10px; padding: 5px; }
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 50px; }
.logo { font-family: "Courier New", Courier, monospace; font-size: 18px; font-weight: bold; text-decoration: none !important; color: var(--text-primary); background: transparent !important;}
.nav-links { display: flex; gap: 15px; align-items: center; }
.nav-links a { color: var(--text-primary); font-weight: bold; text-decoration: none; }
.nav-links a:hover, .nav-links a.active { text-decoration: underline; background: transparent; color: var(--link-color); }
.theme-toggle { background: transparent; border: none; font-family: "Courier New", Courier, monospace; font-weight: bold; cursor: pointer; color: var(--text-primary); text-decoration: underline; font-size: 14px; }
.theme-toggle:hover { background: var(--text-primary); color: var(--bg-color); text-decoration: none; }
.mobile-toggle { display: none; background: transparent; border: none; font-weight: bold; cursor: pointer; color: var(--text-primary); font-size: 14px; }

/* Hero Section */
.hero { text-align: center; padding: 40px 20px; }
.hero h1 { font-family: "Times New Roman", Times, serif; font-size: 32px; margin-bottom: 15px; }
.hero p { font-size: 14px; margin: 0 auto 20px; }
.hero-btns { display: flex; gap: 10px; justify-content: center; }

/* Stats Section */
.stats-container { margin-bottom: 30px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.stat-card { padding: 10px; text-align: center; }
.stat-value { font-family: "Courier New", Courier, monospace; font-size: 24px; font-weight: bold; color: var(--primary-color); }
.stat-label { font-size: 11px; text-transform: uppercase; margin-top: 5px; font-weight: bold;}

/* Directory / Grid */
.section-header { margin: 20px 0 10px; display: flex; justify-content: space-between; align-items: center; background-color: var(--title-bar-bg); color: var(--title-bar-text); padding: 5px 10px; border: 1px solid var(--border-darker); }
.section-header h2 { font-size: 16px; margin: 0; }
.section-header a { color: var(--title-bar-text); text-decoration: underline; }
.section-header a:hover { background: transparent; color: var(--title-bar-text); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-bottom: 40px; }

/* Extension Card */
.card {
    background: var(--surface-color);
    border-top: 2px solid var(--border-light);
    border-left: 2px solid var(--border-light);
    border-right: 2px solid var(--border-darker);
    border-bottom: 2px solid var(--border-darker);
    padding: 10px;
    display: flex;
    flex-direction: column;
}
.card-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.card-icon { 
    border: 2px inset var(--border-darker); 
    padding: 5px; 
    background: var(--textbox-bg); 
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.card-title-group h3 { font-size: 16px; margin-bottom: 5px; text-decoration: underline; }

/* Fixed Badges */
.badge { 
    display: inline-block; 
    border: 1px solid var(--border-darker); 
    padding: 2px 6px; 
    font-size: 10px; 
    font-family: "Courier New", monospace; 
    font-weight: bold;
    text-transform: uppercase; 
    background: var(--badge-bg); 
}
.badge.available { color: var(--status-available); }
.badge.beta { color: var(--status-beta); }
.badge.coming-soon { color: var(--status-coming); }

/* Fixed Text Description Box */
.card-desc { 
    font-size: 12px; 
    flex-grow: 1; 
    margin-bottom: 15px; 
    display: -webkit-box; 
    -webkit-line-clamp: 3; 
    line-clamp: 3;
    -webkit-box-orient: vertical; 
    overflow: hidden; 
    border: 2px inset var(--border-darker);
    padding: 6px;
    background: var(--textbox-bg);
    color: var(--text-primary);
}
.card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 2px groove var(--border-light); }
.browser-icons { font-family: "Courier New", Courier, monospace; font-size: 11px; }

/* Controls (Search & Filter) */
.controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; padding: 10px; }
.search-wrapper input, .filter-group select {
    padding: 5px; 
    border-top: 2px solid var(--border-darker); 
    border-left: 2px solid var(--border-darker); 
    border-bottom: 2px solid var(--border-light); 
    border-right: 2px solid var(--border-light);
    background: var(--textbox-bg); 
    color: var(--text-primary); 
    font-family: "Verdana", sans-serif; 
    font-size: 12px; 
    outline: none;
}
.search-wrapper input:focus, .filter-group select:focus { 
    background: #ffffcc; 
    color: #000000;
}
[data-theme="dark"] .search-wrapper input:focus, [data-theme="dark"] .filter-group select:focus { 
    background: #0d1a1a; 
    color: #ffffff; 
}

/* Extension Detail Page Layout */
.detail-layout { display: grid; grid-template-columns: 250px 1fr; gap: 20px; margin: 20px 0 40px; }
.detail-sidebar { padding: 15px; text-align: center; }
.detail-icon { 
    border: 2px inset var(--border-darker); 
    padding: 10px; 
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    background: var(--textbox-bg);
    margin-bottom: 10px; 
}
.install-links { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.install-btn { display: block; text-align: center; }
.detail-content h1 { font-family: "Times New Roman", Times, serif; font-size: 28px; margin-bottom: 5px; border-bottom: 2px groove var(--border-light); }
.detail-meta { margin-bottom: 15px; font-size: 12px; font-family: "Courier New", monospace; }
.detail-meta span { display: block; margin-bottom: 5px; }

/* Footer */
footer { padding: 15px; margin-top: auto; font-size: 12px; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 20px; }
.footer-brand h3 { margin-bottom: 10px; }
.footer-links h4 { margin-bottom: 10px; text-decoration: underline; }
.footer-bottom { text-align: center; padding-top: 15px; border-top: 2px groove var(--border-light); }

/* Typography Pages */
.prose { margin: 20px auto 40px; padding: 20px; }
.prose h1, .prose h2 { font-family: "Times New Roman", Times, serif; border-bottom: 1px dotted var(--text-primary); margin-bottom: 15px; }
.prose p { margin-bottom: 15px; }

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; background: var(--surface-color); border: 2px solid var(--border-darker); padding: 10px; flex-direction: column; position: absolute; top: 40px; left: 10px; right: 10px; z-index: 999; }
    .nav-links.active { display: flex; }
    .mobile-toggle { display: block; }
    .detail-layout { grid-template-columns: 1fr; }
}
