/* Common Herb - Shared Styles */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

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

body {
    font-family: 'VT323', 'Courier New', monospace;
    background-color: #080d08;
    color: #33ff33;
    line-height: 1.5;
    min-height: 100vh;
    font-size: 18px;
    text-shadow: 0 0 5px rgba(51, 255, 51, 0.5);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 25px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2px;
    padding: 15px 20px 5px;
    position: relative;
}

h1 {
    font-size: 3.5em;
    font-weight: normal;
    letter-spacing: 10px;
    margin-bottom: 0;
    color: #33ff33;
    text-transform: uppercase;
    font-family: 'VT323', monospace;
    text-shadow: 0 0 10px rgba(51, 255, 51, 0.8), 0 0 20px rgba(51, 255, 51, 0.4);
}

h1 a {
    color: #33ff33;
    text-decoration: none;
}

h1 a:hover {
    color: #66ff66;
    text-shadow: 0 0 15px rgba(51, 255, 51, 1), 0 0 30px rgba(51, 255, 51, 0.6);
}

/* Navigation */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.main-nav a {
    color: #33ff33;
    text-decoration: none;
    font-family: 'VT323', monospace;
    font-size: 1.4em;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.main-nav a:hover {
    color: #66ff66;
    border-bottom-color: #66ff66;
    text-shadow: 0 0 10px rgba(51, 255, 51, 0.8);
}

.main-nav a.active {
    border-bottom-color: #33ff33;
}

.back-link {
    position: absolute;
    top: 30px;
    left: 20px;
    color: #33ff33;
    text-decoration: none;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.back-link:hover {
    color: #66ff66;
}

/* Terminal Box Style */
.terminal-box {
    position: relative;
    padding: 20px;
    margin: 10px 0;
}

.terminal-box::before {
    content: '┌' attr(data-title) '┐';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

/* Login Button */
.login-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 8px 16px;
    background-color: transparent;
    border: 1px solid #33ff33;
    color: #33ff33;
    font-family: 'VT323', monospace;
    font-size: 1.1em;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(51, 255, 51, 0.5);
    box-shadow: 0 0 5px rgba(51, 255, 51, 0.3), inset 0 0 5px rgba(51, 255, 51, 0.1);
}

.login-btn:hover {
    background-color: rgba(51, 255, 51, 0.1);
    box-shadow: 0 0 10px rgba(51, 255, 51, 0.5), inset 0 0 10px rgba(51, 255, 51, 0.2);
}

/* Login Modal */
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: flex-start;
    align-items: flex-end;
}

.login-box {
    background-color: transparent;
    border: none;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    margin-left: 0;
    margin-bottom: 0;
}

.login-box input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #33ff33;
    color: #33ff33;
    font-family: 'VT323', monospace;
    font-size: 1.1em;
    text-shadow: 0 0 5px rgba(51, 255, 51, 0.5);
    box-shadow: 0 0 5px rgba(51, 255, 51, 0.2), inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.login-box input:focus {
    outline: none;
    border-color: #66ff66;
    box-shadow: 0 0 10px rgba(51, 255, 51, 0.4), inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.login-box input::placeholder {
    color: #1a8c1a;
}

.login-box button {
    width: 48%;
    padding: 12px;
    background-color: transparent;
    border: none;
    color: #33ff33;
    font-family: 'VT323', monospace;
    font-size: 1.2em;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-box button:hover {
    color: #66ff66;
    text-shadow: 0 0 10px rgba(51, 255, 51, 0.8);
}

.login-error {
    color: #ff3333;
    font-family: 'VT323', monospace;
    font-size: 1em;
    text-align: center;
    margin-top: 10px;
    display: none;
    text-shadow: 0 0 5px rgba(255, 51, 51, 0.5);
}

/* Content action buttons (New Post, New Track, etc.) */
.new-content-btn {
    display: none;
    text-align: center;
    margin: 30px 0;
}

.new-content-btn button {
    padding: 12px 24px;
    background-color: transparent;
    border: none;
    color: #33ff33;
    font-family: 'VT323', monospace;
    font-size: 1.3em;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.new-content-btn button:hover {
    color: #66ff66;
    text-shadow: 0 0 10px rgba(51, 255, 51, 0.8);
}

/* Modal / Editor common styles (site pages only — text.html post editor) */
.site-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    overflow-y: auto;
    padding: 40px 20px;
}

.editor {
    background-color: #080d08;
    border: 1px solid #33ff33;
    padding: 30px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(51, 255, 51, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
}

.editor::before {
    content: '┌────────────────────────────────────────┐';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    color: #33ff33;
    font-size: 0.8em;
    letter-spacing: -1px;
    display: none;
}

.editor label {
    display: block;
    color: #1a8c1a;
    font-family: 'VT323', monospace;
    font-size: 1em;
    margin-bottom: 5px;
    margin-top: 15px;
    text-shadow: none;
}

.editor label:first-child {
    margin-top: 0;
}

.editor input,
.editor textarea {
    width: 100%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #1a8c1a;
    color: #33ff33;
    font-family: 'VT323', monospace;
    font-size: 1.1em;
    margin-bottom: 10px;
    text-shadow: 0 0 5px rgba(51, 255, 51, 0.5);
}

.editor textarea {
    min-height: 100px;
    resize: vertical;
}

.editor input:focus,
.editor textarea:focus {
    outline: none;
    border-color: #33ff33;
    box-shadow: 0 0 5px rgba(51, 255, 51, 0.3);
}

.editor input[type="file"] {
    padding: 5px;
}

.button-row {
    display: flex;
    gap: 4%;
    margin-top: 20px;
}

.editor button {
    width: 48%;
    padding: 12px;
    background-color: transparent;
    border: none;
    color: #33ff33;
    font-family: 'VT323', monospace;
    font-size: 1.2em;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.editor button:hover {
    color: #66ff66;
    text-shadow: 0 0 10px rgba(51, 255, 51, 0.8);
}

/* Content cards - Terminal box style */
.content-card,
.post {
    background-color: #080d08;
    border: 1px solid #33ff33;
    padding: 25px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 0 10px rgba(51, 255, 51, 0.2), inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.content-card::before,
.post::before {
    content: '┌──────────────────────────────────────────────────────────────────────┐';
    position: absolute;
    top: -12px;
    left: -1px;
    color: #33ff33;
    font-size: 0.7em;
    overflow: hidden;
    width: calc(100% + 2px);
    text-shadow: 0 0 5px rgba(51, 255, 51, 0.5);
}

.content-card::after,
.post::after {
    content: '└──────────────────────────────────────────────────────────────────────┘';
    position: absolute;
    bottom: -12px;
    left: -1px;
    color: #33ff33;
    font-size: 0.7em;
    overflow: hidden;
    width: calc(100% + 2px);
    text-shadow: 0 0 5px rgba(51, 255, 51, 0.5);
}

.content-title,
.post-title {
    color: #33ff33;
    font-size: 1.8em;
    font-weight: normal;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(51, 255, 51, 0.6);
}

.content-subtitle,
.post-subtitle {
    color: #1a8c1a;
    font-size: 1.2em;
    margin-bottom: 20px;
    font-style: normal;
}

.content-body,
.post-body {
    color: #33ff33;
    line-height: 1.8;
    white-space: pre-wrap;
    font-size: 1.1em;
}

/* Post media */
.post-media {
    margin: 20px 0;
}

.post-media img,
.post-media video,
.post-media audio {
    max-width: 100%;
    border: 1px solid #33ff33;
    box-shadow: 0 0 10px rgba(51, 255, 51, 0.3);
}

.post-controls {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Edit/Delete controls */
.content-controls {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.edit-btn,
.delete-btn {
    padding: 6px 12px;
    background-color: transparent;
    border: none;
    color: #33ff33;
    font-family: 'VT323', monospace;
    font-size: 1em;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.edit-btn:hover,
.delete-btn:hover {
    color: #66ff66;
    text-shadow: 0 0 10px rgba(51, 255, 51, 0.8);
}

.delete-btn {
    color: #ff3333;
    text-shadow: 0 0 5px rgba(255, 51, 51, 0.5);
}

.delete-btn:hover {
    color: #ff6666;
    text-shadow: 0 0 10px rgba(255, 51, 51, 0.8);
}

/* Footer */
footer {
    text-align: center;
    margin-top: auto;
    padding: 30px 0 10px 0;
    color: #1a8c1a;
    font-size: 1em;
    text-shadow: 0 0 5px rgba(51, 255, 51, 0.3);
}

/* Links */
a {
    color: #33ff33;
    text-decoration: underline;
}

a:hover {
    color: #66ff66;
    text-shadow: 0 0 10px rgba(51, 255, 51, 0.8);
}

/* Site back bar for app pages */
.site-back-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: #080d08;
    border-bottom: 1px solid #1a3a1a;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 20px;
    z-index: 9000;
}

.site-back-bar a {
    color: #1a8c1a;
    text-decoration: none;
    font-family: 'VT323', monospace;
    font-size: 0.9em;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.site-back-bar a:hover {
    color: #33ff33;
    text-shadow: 0 0 5px rgba(51, 255, 51, 0.5);
}

.site-back-bar .bar-nav {
    display: flex;
    gap: 15px;
    margin-left: 10px;
    padding-left: 15px;
    border-left: 1px solid #1a3a1a;
}

.site-back-bar .bar-nav a {
    font-size: 0.85em;
    letter-spacing: 1px;
}

/* Universal Top Bar */
.universal-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 32px;
    background: #080d08;
    border-bottom: 1px solid #1a3a1a;
    display: flex;
    align-items: center;
    z-index: 9000;
    font-family: 'VT323', monospace;
}

.universal-bar-nav {
    display: flex;
    align-items: baseline;
    flex-shrink: 0;
    padding: 0 0 0 10px;
    gap: 0;
}

.universal-bar-nav a {
    color: #33ff33;
    text-decoration: none;
    font-family: 'VT323', monospace;
    text-transform: uppercase;
    white-space: nowrap;
}

.universal-bar-nav .ub-brand {
    font-size: 1em;
    letter-spacing: 2px;
    padding: 0 8px;
}

.universal-bar-nav .ub-brand:hover {
    color: #66ff66;
    text-shadow: 0 0 8px rgba(51, 255, 51, 0.8);
}

.universal-bar-nav .ub-sep {
    color: #1a3a1a;
    margin: 0 6px 0 6px;
    user-select: none;
}

.universal-bar-nav .ub-sep:last-child {
    margin-right: 0;
    margin-left: 3px;
}

.universal-bar-nav .ub-link {
    font-size: 0.95em;
    letter-spacing: 1px;
    padding: 0 5px;
    color: #1a8c1a;
}

.universal-bar-nav .ub-link:last-of-type {
    padding-right: 0;
}

.universal-bar-nav .ub-link:hover {
    color: #33ff33;
    text-shadow: 0 0 5px rgba(51, 255, 51, 0.5);
}

.universal-bar-ticker {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    margin-left: 0;
}

.universal-bar-ticker .ticker-track {
    display: inline-block;
    animation: universal-ticker-scroll linear infinite;
    color: #1a8c1a;
    font-family: 'VT323', monospace;
    font-size: 0.85em;
    opacity: 0.8;
    letter-spacing: 1px;
    white-space: nowrap;
}

@keyframes universal-ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Number input spinners — green theme */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    filter: invert(1) hue-rotate(90deg) brightness(0.7);
}

/* Responsive */
@media (max-width: 600px) {
    h1 {
        font-size: 2.2em;
        letter-spacing: 5px;
    }

    .main-nav {
        gap: 15px;
    }

    .main-nav a {
        font-size: 1.2em;
    }

    .content-card::before,
    .post::before,
    .content-card::after,
    .post::after {
        display: none;
    }
}
