/* Mirror of assets/css/retro.css for webroot access */
/**
 * FlagNet BBS - Retro CSS Theme
 * 
 * Faithful recreation of C-Net/Amiga-style BBS aesthetic
 * with green-on-black, amber-on-black, and white-on-black themes
 */

@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0.05em;
    overflow-x: hidden;
    position: relative;
}

/* Theme Variables */
body.theme-green {
    background-color: #000000;
    color: #00ff00;
}

body.theme-amber {
    background-color: #000000;
    color: #ffaa00;
}

body.theme-white {
    background-color: #000000;
    color: #ffffff;
}

/* Scanlines Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.scanlines.hidden {
    opacity: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: normal;
    margin: 20px 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

h1 { font-size: 2.5em; }
h2 { font-size: 2em; }
h3 { font-size: 1.5em; }
h4 { font-size: 1.25em; }

p {
    margin: 10px 0;
}

code {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    font-family: 'VT323', monospace;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ASCII Logo Header */
.bbs-header {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 20px 0;
    border-bottom: 2px solid;
    margin-bottom: 20px;
}

body.theme-green .bbs-header {
    border-color: #00ff00;
}

body.theme-amber .bbs-header {
    border-color: #ffaa00;
}

body.theme-white .bbs-header {
    border-color: #ffffff;
}

.ascii-logo {
    font-size: 0.8em;
    line-height: 1.2;
    white-space: pre;
    font-family: 'Courier New', monospace;
    text-align: center;
    margin: 10px 0;
    word-break: break-all;
}

.header-tagline {
    text-align: center;
    font-size: 0.9em;
    margin-top: 10px;
    opacity: 0.8;
}

/* Navigation */
.navbar {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 15px 0;
    margin-bottom: 20px;
    border-top: 1px solid;
    border-bottom: 1px solid;
}

body.theme-green .navbar {
    border-color: #00ff00;
}

body.theme-amber .navbar {
    border-color: #ffaa00;
}

body.theme-white .navbar {
    border-color: #ffffff;
}

.navbar .container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-link {
    color: inherit;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid;
    border-color: inherit;
    background-color: transparent;
    transition: all 0.2s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.nav-link.admin {
    font-weight: bold;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

/* Main Content */
main {
    min-height: 60vh;
    padding: 20px 0;
}

/* Tables */
table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
    border: 1px solid;
}

body.theme-green table {
    border-color: #00ff00;
}

body.theme-amber table {
    border-color: #ffaa00;
}

body.theme-white table {
    border-color: #ffffff;
}

th {
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid;
    background-color: rgba(255, 255, 255, 0.05);
    text-transform: uppercase;
    font-weight: normal;
    letter-spacing: 0.1em;
}

body.theme-green th {
    border-color: #00ff00;
}

body.theme-amber th {
    border-color: #ffaa00;
}

body.theme-white th {
    border-color: #ffffff;
}

td {
    padding: 8px 10px;
    border-bottom: 1px solid;
}

body.theme-green td {
    border-color: rgba(0, 255, 0, 0.3);
}

body.theme-amber td {
    border-color: rgba(255, 170, 0, 0.3);
}

body.theme-white td {
    border-color: rgba(255, 255, 255, 0.3);
}

tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

tr.pinned {
    background-color: rgba(255, 255, 255, 0.08);
    font-weight: bold;
}

/* Links */
a {
    color: inherit;
    text-decoration: underline;
    transition: all 0.2s;
}

a:hover {
    transform: scale(1.02);
}

/* Buttons */
.btn {
    padding: 8px 15px;
    border: 1px solid;
    border-color: inherit;
    background-color: transparent;
    color: inherit;
    cursor: pointer;
    font-family: 'VT323', monospace;
    font-size: 1em;
    text-transform: uppercase;
    transition: all 0.2s;
}

.btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    font-weight: bold;
}

.btn-secondary {
    opacity: 0.7;
}

.btn-sm {
    padding: 3px 8px;
    font-size: 0.9em;
}

/* Forms */
form {
    margin: 20px 0;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.05em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 8px;
    border: 1px solid;
    background-color: #000000;
    color: inherit;
    font-family: 'VT323', monospace;
    font-size: 1em;
}

body.theme-green input,
body.theme-green textarea,
body.theme-green select {
    border-color: #00ff00;
}

body.theme-amber input,
body.theme-amber textarea,
body.theme-amber select {
    border-color: #ffaa00;
}

body.theme-white input,
body.theme-white textarea,
body.theme-white select {
    border-color: #ffffff;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 5px;
}

body.theme-green input:focus,
body.theme-green textarea:focus {
    box-shadow: 0 0 5px #00ff00;
}

body.theme-amber input:focus,
body.theme-amber textarea:focus {
    box-shadow: 0 0 5px #ffaa00;
}

body.theme-white input:focus,
body.theme-white textarea:focus {
    box-shadow: 0 0 5px #ffffff;
}

small {
    display: block;
    margin-top: 3px;
    opacity: 0.7;
    font-size: 0.8em;
}

/* Alerts */
.alert {
    padding: 12px;
    margin: 15px 0;
    border: 1px solid;
    border-left: 4px solid;
    background-color: rgba(255, 255, 255, 0.03);
}

.alert-error {
    color: #ff5555;
}

.alert-success {
    color: #55ff55;
}

.alert-info {
    color: #55aaff;
}

/* Cards / Panels */
.panel {
    border: 1px solid;
    padding: 15px;
    margin: 15px 0;
    background-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

/* Lists */
ul, ol {
    margin: 10px 0 10px 20px;
}

/* Footer */
.bbs-footer {
    padding: 20px 0;
    border-top: 1px solid;
    margin-top: 20px;
    background-color: rgba(0, 0, 0, 0.4);
}

body.theme-green .bbs-footer {
    border-color: #00ff00;
}

body.theme-amber .bbs-footer {
    border-color: #ffaa00;
}

body.theme-white .bbs-footer {
    border-color: #ffffff;
}

/* Boards List */
.boards-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.board-card {
    border: 1px solid;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.4);
}

.board-card h3 {
    margin: 0 0 8px 0;
}

.board-card p {
    margin: 5px 0;
}

/* Thread List */
.thread-list {
    width: 100%;
}

.thread-list td:first-child {
    width: 55%;
}

.thread-list td:nth-child(2),
.thread-list td:nth-child(3),
.thread-list td:nth-child(4) {
    width: 15%;
}

.thread-list .subject {
    font-weight: bold;
}

.thread-list .pinned::before {
    content: '[PIN] ';
    color: inherit;
}

/* Thread View */
.post {
    border: 1px solid;
    padding: 12px;
    margin-bottom: 15px;
    background-color: rgba(0, 0, 0, 0.4);
}

.post-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95em;
    opacity: 0.9;
}

.post-content {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 1em;
}

/* Forms */
.thread-form, .post-form {
    border: 1px solid;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.4);
}

/* Login/Register Forms */
.auth-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid;
    background-color: rgba(0, 0, 0, 0.4);
}

.auth-container h2 {
    text-align: center;
}

/* File List */
.file-list td:nth-child(1) { width: 40%; }
.file-list td:nth-child(2) { width: 15%; }
.file-list td:nth-child(3) { width: 25%; }
.file-list td:nth-child(4) { width: 20%; }

/* Profile */
.profile-card {
    max-width: 700px;
    margin: 0 auto;
    border: 1px solid;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.4);
}

.profile-card h2 {
    margin-top: 0;
}

/* Admin */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.admin-card {
    border: 1px solid;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.4);
}

/* ANSI Color Classes */
.ansi-green { color: #00ff00; }
.ansi-amber { color: #ffaa00; }
.ansi-white { color: #ffffff; }
.ansi-bold { font-weight: bold; }

.ansi-black { color: #000000; }
.ansi-red { color: #ff0000; }
.ansi-yellow { color: #ffff00; }
.ansi-blue { color: #0000ff; }
.ansi-magenta { color: #ff00ff; }
.ansi-cyan { color: #00ffff; }
.ansi-bright-black { color: #555555; }
.ansi-bright-red { color: #ff5555; }
.ansi-bright-green { color: #55ff55; }
.ansi-bright-yellow { color: #ffff55; }
.ansi-bright-blue { color: #5555ff; }
.ansi-bright-magenta { color: #ff55ff; }
.ansi-bright-cyan { color: #55ffff; }
.ansi-bright-white { color: #ffffff; }

/* Highlight */
.highlight {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0 2px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 6px;
    border: 1px solid;
    margin-left: 6px;
    font-size: 0.85em;
}

/* Pager */
.pager {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    align-items: center;
}

/* Upload widget */
.upload-widget {
    border: 1px dashed;
    padding: 12px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.3);
}

/* Small utility */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { opacity: 0.7; }
.mt-1 { margin-top: 10px; }
.mb-1 { margin-bottom: 10px; }
.mt-2 { margin-top: 20px; }
.mb-2 { margin-bottom: 20px; }

/* Retro CRT glow */
.crt {
    text-shadow: 0 0 4px currentColor, 0 0 8px currentColor;
}

/* Scanline overlay already added */

/* Responsive tweaks */
@media (max-width: 768px) {
    .ascii-logo {
        font-size: 0.65em;
    }
    .navbar .container {
        flex-direction: column;
    }
    table, th, td {
        font-size: 0.95em;
    }
}
