/* TriTownBBS - Terminal Style CSS */

/* Reset and Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #000;
    color: #0f0;
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
}

.board-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 0.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #0f0;
    font-weight: normal;
    margin: 1rem 0 0.5rem 0;
}

p {
    margin: 0.5rem 0;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #0f0;
    padding-bottom: 1rem;
}

.ascii-art {
    font-size: 16px;
    white-space: pre;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px #0f0;
}

.user-info {
    font-size: 12px;
    margin-top: 1rem;
}

/* Board Header */
.board-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #0f0;
    flex-shrink: 0;
}

.board-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.board-title {
    font-weight: bold;
    font-size: 16px;
    text-shadow: 0 0 5px #0f0;
}

.board-info {
    font-size: 12px;
    color: #090;
    margin: 0.5rem 0;
}

.board-description {
    font-size: 13px;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-left: 2px solid #0f0;
    background-color: #001100;
}

/* Buttons */
button {
    background: #111;
    color: #0f0;
    border: 1px solid #0f0;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    transition: all 0.2s;
}

button:hover {
    background: #002200;
    text-shadow: 0 0 5px #0f0;
}

button:active {
    background: #0f0;
    color: #000;
}

button:disabled {
    background: #333;
    color: #666;
    border-color: #666;
    cursor: not-allowed;
}

.primary-btn {
    background: #002200;
    font-weight: bold;
}

.secondary-btn {
    background: #111;
}

.danger-btn {
    background: #220000;
    color: #f00;
    border-color: #f00;
}

.danger-btn:hover {
    background: #330000;
    text-shadow: 0 0 5px #f00;
}

.nav-btn {
    padding: 0.3rem 0.8rem;
    font-size: 12px;
}

.admin-btn {
    font-size: 12px;
    padding: 0.4rem 0.8rem;
}

.voice-btn {
    font-size: 10px;
    padding: 0.2rem 0.5rem;
}

/* Form Elements */
input, textarea, select {
    background-color: #111;
    color: #0f0;
    border: 1px solid #0f0;
    font-family: inherit;
    font-size: inherit;
    padding: 0.5rem;
    margin: 0.25rem 0;
    width: 100%;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #0ff;
    box-shadow: 0 0 5px #0ff;
}

textarea {
    resize: vertical;
    min-height: 4rem;
}

#message-input {
    min-height: 6rem;
    resize: vertical;
}

/* Control Panel */
.control-panel {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid #0f0;
    background-color: #001100;
}

.tip-btn {
    background: #000033;
    color: #ffd700;
    border-color: #ffd700;
}

.tip-btn:hover {
    background: #000044;
    text-shadow: 0 0 5px #ffd700;
}

/* Device Info */
.device-info {
    text-align: center;
    font-size: 12px;
    color: #090;
    margin-bottom: 1rem;
}

/* Boards Section */
.boards-section {
    margin-bottom: 2rem;
}

.board-list {
    border: 1px solid #0f0;
    background-color: #001100;
}

.board-item {
    padding: 1rem;
    border-bottom: 1px solid #0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.board-item:hover {
    background-color: #002200;
}

.board-item:last-child {
    border-bottom: none;
}

.board-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.access-type {
    color: #ff0;
    font-weight: bold;
}

.board-title {
    font-weight: bold;
    flex-grow: 1;
}

.board-meta {
    color: #090;
    font-size: 12px;
}

.board-description {
    color: #ccc;
    font-size: 12px;
    margin: 0.5rem 0;
}

.board-info {
    color: #666;
    font-size: 11px;
}

/* Messages */
.messages-main {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    border: 1px solid #0f0;
    background-color: #001100;
}

.message-list {
    padding: 1rem;
    height: 100%;
    overflow-y: auto;
}

.message-item {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.message-item:last-child {
    border-bottom: none;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 12px;
}

.message-author {
    color: #ff0;
    font-weight: bold;
}

.message-meta {
    color: #666;
}

.message-text {
    color: #0f0;
    line-height: 1.6;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Compose Section */
.compose-section {
    flex-shrink: 0;
    border: 1px solid #0f0;
    background-color: #001100;
    padding: 1rem;
}

.compose-container {
    width: 100%;
}

.compose-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.compose-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.compose-tips {
    font-size: 10px;
    color: #666;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #000;
    border: 2px solid #0f0;
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #0f0;
    padding-bottom: 0.5rem;
}

.close-modal {
    color: #f00;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
}

.close-modal:hover {
    text-shadow: 0 0 5px #f00;
}

/* Form Groups */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #0f0;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: auto;
    margin: 0;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Auth Required */
.auth-required {
    text-align: center;
    padding: 2rem;
    border: 1px solid #ff0;
    background-color: #221100;
    margin: 2rem 0;
}

.auth-required p {
    margin-bottom: 1rem;
}

/* Loading */
.loading {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
}

/* Error Messages */
.error-message {
    background-color: #220000;
    color: #ff0;
    border: 1px solid #ff0;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

/* Legend */
.legend {
    text-align: center;
    font-size: 11px;
    color: #666;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

/* Footer */
.app-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #0f0;
    font-size: 11px;
    color: #666;
}

/* Admin Actions */
.admin-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-actions hr {
    border: none;
    border-top: 1px solid #0f0;
    margin: 1rem 0;
}

/* Keyboard Helper */
.keyboard-helper {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #001100;
    border-top: 1px solid #0f0;
    padding: 0.5rem;
    text-align: center;
    z-index: 100;
}

.helper-btn {
    padding: 0.5rem 2rem;
    font-size: 16px;
}

/* Links */
a {
    color: #0ff;
    text-decoration: none;
}

a:hover {
    text-shadow: 0 0 5px #0ff;
}

.admin-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #0f0;
    background: #111;
    margin: 0.25rem;
    transition: all 0.2s;
}

.admin-link:hover {
    background: #002200;
    text-shadow: 0 0 5px #0f0;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #111;
}

::-webkit-scrollbar-thumb {
    background: #0f0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0ff;
}

/* Tip Jar Styles */
.tip-content {
    text-align: center;
}

.tip-amounts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.tip-amount-btn {
    background: #000033;
    color: #ffd700;
    border: 2px solid #ffd700;
    padding: 1.5rem 1rem;
    font-size: 18px;
    line-height: 1.3;
    cursor: pointer;
    transition: all 0.3s;
}

.tip-amount-btn:hover {
    background: #000044;
    text-shadow: 0 0 10px #ffd700;
    transform: scale(1.05);
}

.tip-label {
    font-size: 12px;
    display: block;
    margin-top: 0.5rem;
    color: #cccccc;
}

.custom-amount {
    margin: 2rem 0;
    padding: 1rem;
    border: 1px solid #666;
    background: #001100;
}

.custom-amount label {
    display: block;
    margin-bottom: 0.5rem;
    text-align: left;
}

.custom-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.currency-symbol {
    color: #ffd700;
    font-weight: bold;
    font-size: 18px;
}

#custom-tip-amount {
    flex-grow: 1;
    min-width: 0;
}

.custom-tip-btn {
    background: #000033;
    color: #ffd700;
    border: 1px solid #ffd700;
    white-space: nowrap;
}

.tip-info {
    margin-top: 2rem;
    padding: 1rem;
    border: 1px solid #333;
    background: #001100;
    text-align: left;
    font-size: 12px;
}

.tip-info ul {
    margin: 1rem 0;
    padding-left: 1rem;
}

.tip-info li {
    margin: 0.5rem 0;
    color: #090;
}

.tip-privacy {
    font-size: 10px;
    color: #666;
    font-style: italic;
    margin-top: 1rem;
    text-align: center;
}

/* Admin Panel Styles */
.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 12px;
}

.nav-link {
    text-decoration: none;
    color: #0ff;
    padding: 0.3rem 0.8rem;
    border: 1px solid #0ff;
    background: #111;
}

.nav-link:hover {
    background: #002200;
    text-shadow: 0 0 5px #0ff;
}

.admin-section {
    margin: 2rem 0;
    padding: 1.5rem;
    border: 1px solid #0f0;
    background: #001100;
}

.admin-section h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: center;
    text-shadow: 0 0 5px #0f0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid #333;
    background: #000;
}

.stat-label {
    color: #ccc;
}

.stat-value {
    color: #0ff;
    font-weight: bold;
}

/* Invite Management */
.invite-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.invite-generators {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.invite-bulk {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.invite-bulk label {
    color: #ccc;
}

.invite-list h3 {
    margin-bottom: 1rem;
    color: #0f0;
}

.invite-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid #333;
    background: #000;
}

.invite-info {
    flex-grow: 1;
}

.invite-type {
    color: #ff0;
    font-weight: bold;
    margin: 0 1rem;
}

.invite-expires {
    color: #666;
    font-size: 12px;
}

.invite-actions {
    display: flex;
    gap: 0.5rem;
}

/* QR Code Display */
.qr-display {
    text-align: center;
}

#qr-code-container {
    margin: 2rem auto;
    padding: 1rem;
    background: #fff;
    display: inline-block;
    border-radius: 8px;
}

.qr-info {
    margin: 2rem 0;
    text-align: left;
    padding: 1rem;
    border: 1px solid #333;
    background: #000;
}

.qr-info p {
    margin: 0.5rem 0;
}

#invite-url {
    width: 100%;
    margin-top: 0.5rem;
    font-size: 12px;
}

.qr-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Bulk Invites */
.bulk-invites-content {
    text-align: center;
}

.bulk-invite-list {
    margin: 1rem 0;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #333;
    background: #000;
    padding: 1rem;
}

.bulk-invite-item {
    margin: 0.5rem 0;
    padding: 0.5rem;
    border-bottom: 1px solid #333;
    font-size: 12px;
}

.bulk-invite-item:last-child {
    border-bottom: none;
}

/* Board Management */
.board-admin-list {
    max-height: 400px;
    overflow-y: auto;
}

.board-admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid #333;
    background: #000;
}

.board-admin-info {
    flex-grow: 1;
}

.board-access {
    color: #ff0;
    margin-left: 1rem;
}

.board-stats {
    color: #666;
    font-size: 12px;
    margin-top: 0.5rem;
}

.board-admin-actions {
    display: flex;
    gap: 0.5rem;
}

/* User Management */
.user-management {
    text-align: center;
}

.user-actions {
    margin-bottom: 2rem;
}

.user-list {
    max-height: 400px;
    overflow-y: auto;
    text-align: left;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid #333;
    background: #000;
}

.user-info {
    flex-grow: 1;
}

.admin-badge {
    color: #ff0;
    font-weight: bold;
    margin-left: 1rem;
}

.user-meta {
    color: #666;
    font-size: 12px;
    margin-top: 0.5rem;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-item label {
    color: #ccc;
    font-size: 14px;
}

.setting-item select,
.setting-item input {
    padding: 0.5rem;
    background: #111;
    color: #0f0;
    border: 1px solid #0f0;
}

/* Danger Zone */
.danger-zone {
    border-color: #f00 !important;
    background: #220000 !important;
}

.danger-zone h2 {
    color: #f00 !important;
    text-shadow: 0 0 5px #f00 !important;
}

.danger-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.danger-warning {
    text-align: center;
    color: #ff0;
    font-style: italic;
    margin: 0;
}

/* Invite Page Styles */
.invite-status {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    padding: 2rem;
    border: 1px solid #0f0;
    background: #001100;
    text-align: center;
}

.invite-status.error {
    border-color: #f00;
    background: #220000;
    color: #ff0;
}

.invite-status.success {
    border-color: #0f0;
    background: #001100;
}

.invite-info {
    text-align: left;
    margin: 2rem 0;
}

.invite-details {
    padding: 1rem;
    border: 1px solid #333;
    background: #000;
    margin-bottom: 2rem;
}

.bbs-description {
    margin: 2rem 0;
}

.bbs-description h3,
.community-rules h3 {
    color: #0ff;
    text-align: center;
    margin-bottom: 1rem;
}

.bbs-description ul {
    list-style: none;
    padding: 0;
}

.bbs-description li {
    margin: 0.5rem 0;
    color: #090;
}

.three-laws {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.law {
    padding: 1rem;
    border: 1px solid #333;
    background: #000;
    text-align: center;
}

.law strong {
    color: #ff0;
    display: block;
    margin-bottom: 0.5rem;
}

.join-section {
    margin: 2rem 0;
}

.age-verification {
    margin: 1.5rem 0;
    padding: 1rem;
    border: 1px solid #ff0;
    background: #221100;
}

.age-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    justify-content: center;
}

.age-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
    transform: scale(1.2);
}

.handle-form {
    max-width: 400px;
    margin: 0 auto;
    text-align: left;
}

.handle-requirements {
    font-size: 12px;
    color: #666;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.success-message {
    margin: 2rem 0;
}

.welcome-ascii {
    margin: 1rem 0;
    color: #0ff;
    font-size: 12px;
}

.welcome-ascii pre {
    margin: 0;
    text-shadow: 0 0 5px #0ff;
}

.next-steps {
    text-align: left;
    margin: 2rem 0;
    padding: 1rem;
    border: 1px solid #333;
    background: #000;
}

.next-steps h3 {
    color: #0ff;
    text-align: center;
    margin-bottom: 1rem;
}

.next-steps ol {
    color: #090;
    line-height: 1.6;
}

.error-details {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid #f00;
    background: #220000;
}

/* Admin Messages */
.admin-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 2rem;
    border: 1px solid;
    background: #000;
    z-index: 1000;
    max-width: 300px;
}

.admin-message.success {
    color: #0f0;
    border-color: #0f0;
    background: #001100;
}

.admin-message.error {
    color: #f00;
    border-color: #f00;
    background: #220000;
}

.admin-message.info {
    color: #0ff;
    border-color: #0ff;
    background: #001122;
}

/* Thank You Modal */
.thank-you-content {
    text-align: center;
}

.big-thanks {
    font-size: 24px;
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
    margin-bottom: 1rem;
}

.thank-you-message p {
    margin: 0.5rem 0;
    font-size: 16px;
}

.thank-you-ascii {
    margin: 2rem 0;
    color: #ff69b4;
    font-size: 12px;
}

.thank-you-ascii pre {
    margin: 0;
    text-shadow: 0 0 5px #ff69b4;
}

/* Selection */
::selection {
    background: #0f0;
    color: #000;
}

::-moz-selection {
    background: #0f0;
    color: #000;
}