/**
 * =============================================================================
 * MTOBEIYF7.COM - MAIN STYLESHEET
 * =============================================================================
 * Design: Minimalist, terminal-style, white background, stainless steel accents
 * Aesthetic: Clean, 90s/2000s inspired, no rounded corners
 * =============================================================================
 */

/* =============================================================================
   CSS VARIABLES (Easy to customize)
   ============================================================================= */

:root {
    /* Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --bg-tertiary: #ECECEC;

    --steel: #8B8B8B;
    --steel-light: #A8A8A8;
    --steel-dark: #6B6B6B;
    --silver: #C0C0C0;

    --text-primary: #000000;
    --text-secondary: #1A1A1A;
    --text-muted: #4A4A4A;
    --text-light: #6B6B6B;

    --link: #4A4A4A;
    --link-hover: #000000;

    --border: #C0C0C0;
    --border-dark: #8B8B8B;

    --success: #2E7D32;
    --error: #C62828;
    --warning: #F57C00;

    /* Typography */
    --font-mono: 'IBM Plex Mono', 'Fira Code', 'Consolas', 'Source Code Pro', monospace;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Layout */
    --max-width: 1200px;
    --header-height: 60px;
}

/* =============================================================================
   RESET & BASE
   ============================================================================= */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--space-md);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

a:hover {
    color: var(--link-hover);
    border-bottom-color: var(--link-hover);
}

/* =============================================================================
   LAYOUT
   ============================================================================= */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.page-content {
    padding: var(--space-xl) 0;
    min-height: calc(100vh - var(--header-height) - 60px);
}

/* =============================================================================
   HEADER & NAVIGATION
   ============================================================================= */

.header {
    background: var(--bg-primary);
    border-bottom: 2px solid var(--steel);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo:hover {
    border-bottom: none;
}

.nav {
    display: flex;
    gap: var(--space-lg);
}

.nav-link {
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: var(--space-sm) 0;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    border-bottom-color: var(--steel);
}

.nav-auth {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: var(--space-sm) var(--space-lg);
    border: 2px solid var(--border-dark);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--steel);
    color: var(--bg-primary);
    border-color: var(--steel);
}

.btn-primary {
    background: var(--steel);
    color: var(--bg-primary);
    border-color: var(--steel);
}

.btn-primary:hover {
    background: var(--steel-dark);
    border-color: var(--steel-dark);
}

.btn-small {
    font-size: var(--font-size-xs);
    padding: var(--space-xs) var(--space-md);
}

/* =============================================================================
   FORMS
   ============================================================================= */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-textarea {
    width: 100%;
    font-family: var(--font-mono);
    font-size: var(--font-size-base);
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--steel);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-hint {
    font-size: var(--font-size-xs);
    color: var(--text-light);
    margin-top: var(--space-xs);
}

.form-error {
    font-size: var(--font-size-sm);
    color: var(--error);
    margin-top: var(--space-xs);
}

/* =============================================================================
   STREAM PLAYER
   ============================================================================= */

.stream-player {
    background: #000;
    aspect-ratio: 16/9;
    position: relative;
    width: 100%;
    margin-bottom: var(--space-lg);
}

.stream-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stream-offline {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--silver);
    font-size: var(--font-size-lg);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stream-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.viewer-count {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.stream-links a {
    margin-left: var(--space-md);
    font-size: var(--font-size-sm);
}

/* =============================================================================
   CHAT
   ============================================================================= */

.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
    border: 2px solid var(--border);
    background: var(--bg-primary);
    margin-bottom: var(--space-xl);
}

.chat-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: var(--font-size-sm);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
}

.chat-message {
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

.chat-message-platform {
    display: inline-block;
    font-size: var(--font-size-xs);
    padding: 0 var(--space-xs);
    background: var(--steel-light);
    color: var(--bg-primary);
    margin-right: var(--space-xs);
    text-transform: uppercase;
}

.chat-message-user {
    font-weight: 600;
    color: var(--steel-dark);
}

.chat-message-text {
    color: var(--text-secondary);
}

.chat-input-container {
    padding: var(--space-md);
    border-top: 1px solid var(--border);
    display: flex;
    gap: var(--space-sm);
}

.chat-input {
    flex: 1;
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
    padding: var(--space-sm);
    border: 1px solid var(--border);
}

/* =============================================================================
   FORUM STYLES (90s/2000s aesthetic)
   ============================================================================= */

.forum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--steel);
}

.forum-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid var(--border);
}

.forum-table th,
.forum-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: var(--font-size-sm);
}

.forum-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: var(--font-size-xs);
}

.forum-table tr:hover {
    background: var(--bg-secondary);
}

.forum-table .thread-title {
    font-weight: 500;
}

.forum-table .thread-meta {
    font-size: var(--font-size-xs);
    color: var(--text-light);
}

.forum-table .pinned {
    background: var(--bg-secondary);
}

.forum-table .locked {
    opacity: 0.7;
}

/* Thread view */
.thread-header {
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    margin-bottom: var(--space-lg);
}

.thread-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-sm);
}

.thread-meta {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.post {
    border: 1px solid var(--border);
    margin-bottom: var(--space-md);
}

.post-header {
    display: flex;
    justify-content: space-between;
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    font-size: var(--font-size-sm);
}

.post-author {
    font-weight: 600;
}

.post-author.admin::after {
    content: '[ADMIN]';
    margin-left: var(--space-sm);
    color: var(--steel);
    font-weight: 500;
}

.post-date {
    color: var(--text-light);
}

.post-content {
    padding: var(--space-lg);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Pagination */
.pagination {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    margin-top: var(--space-xl);
}

.pagination a,
.pagination span {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border);
    font-size: var(--font-size-sm);
}

.pagination .current {
    background: var(--steel);
    color: var(--bg-primary);
    border-color: var(--steel);
}

/* =============================================================================
   MODAL / DIALOGS
   ============================================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-primary);
    border: 2px solid var(--steel);
    padding: var(--space-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border);
}

.modal-close {
    float: right;
    font-size: var(--font-size-xl);
    cursor: pointer;
    color: var(--text-muted);
}

.modal-close:hover {
    color: var(--text-primary);
}

/* =============================================================================
   ALERTS / MESSAGES
   ============================================================================= */

.alert {
    padding: var(--space-md);
    border: 2px solid;
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-sm);
}

.alert-success {
    border-color: var(--success);
    background: rgba(46, 125, 50, 0.1);
    color: var(--success);
}

.alert-error {
    border-color: var(--error);
    background: rgba(198, 40, 40, 0.1);
    color: var(--error);
}

.alert-warning {
    border-color: var(--warning);
    background: rgba(245, 124, 0, 0.1);
    color: var(--warning);
}

/* =============================================================================
   FOOTER
   ============================================================================= */

.footer {
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border);
    font-size: var(--font-size-xs);
    color: var(--text-light);
    text-align: center;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 900px) {
    .chat-container {
        height: 400px;
    }
}

@media (max-width: 600px) {
    :root {
        --font-size-base: 0.9rem;
    }

    .header-inner {
        flex-direction: column;
        height: auto;
        padding: var(--space-md) 0;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-md);
        margin-top: var(--space-md);
    }

    .nav-auth {
        margin-top: var(--space-md);
    }

    .forum-table th:nth-child(3),
    .forum-table td:nth-child(3),
    .forum-table th:nth-child(4),
    .forum-table td:nth-child(4) {
        display: none;
    }
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: var(--font-size-sm); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.hidden { display: none !important; }
.visible { display: block !important; }

/* =============================================================================
   LIVE STREAM CONTROLS
   ============================================================================= */

.live-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stream-player:hover .live-controls {
    opacity: 1;
}

.live-control-btn {
    background: transparent;
    border: none;
    color: #00ff77;
    padding: var(--space-sm);
    cursor: pointer;
    font-size: var(--font-size-base);
    transition: opacity 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-control-btn:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.live-control-btn:active {
    transform: scale(0.95);
}

.live-control-btn svg {
    color: #00ff77;
    fill: #00ff77;
}

/* Volume control */
.volume-control {
    display: flex;
    align-items: center;
    margin: 0 var(--space-sm);
}

#volumeSlider {
    width: 80px;
    height: 4px;
    background: rgba(0, 255, 119, 0.3);
    outline: none;
    border-radius: 2px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #00ff77;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s;
}

#volumeSlider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

#volumeSlider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #00ff77;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: transform 0.1s;
}

#volumeSlider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

#volumeSlider::-moz-range-track {
    background: rgba(0, 255, 119, 0.3);
    height: 4px;
    border-radius: 2px;
}

.live-indicator {
    color: #ff0000;
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Quality selector */
.quality-selector {
    position: relative;
}

.quality-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: var(--space-sm);
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--border);
    border-radius: 4px;
    min-width: 150px;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.quality-menu.active {
    display: flex;
}

.quality-option {
    background: transparent;
    border: none;
    color: white;
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: background 0.2s;
    white-space: nowrap;
}

.quality-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.quality-option.active {
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 600;
}

.quality-option.active:hover {
    background: var(--accent);
}
