/* TMA Members Area — Main Stylesheet */

:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --secondary: #171717;
    --text: #fafafa;
    --text-muted: #a3a3a3;
    --bg: #0a0a0a;
    --card: #171717;
    --border: #2a2a2a;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --radius: 8px;
    /* Aliases used by login/register pages */
    --black: #0a0a0a;
    --black-light: #171717;
    --white: #fafafa;
    --red: #dc2626;
    --red-dark: #b91c1c;
    --red-light: #fca5a5;
    --gray-100: #f5f5f5;
    --gray-400: #a3a3a3;
    --gray-600: #2a2a2a;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--secondary);
    color: white;
    padding: 1rem;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.logo-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.logo-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.35rem;
    color: var(--white);
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.logo-text span {
    display: block;
    font-size: 0.6rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: var(--gray-400);
    text-transform: uppercase;
}

/* Mobile logo */
@media (max-width: 600px) {
    .logo-img {
        width: 40px;
        height: 40px;
    }
}

.nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav a {
    color: white;
    text-decoration: none;
    font-size: 0.875rem;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.nav a:hover {
    opacity: 1;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius);
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

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

.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid white;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: #262626;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #333;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-full {
    width: 100%;
}

/* Main content */
.main {
    flex: 1;
    padding: 2rem 1rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.container-sm {
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

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

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #111;
    color: var(--text);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #111;
    color: var(--text);
    cursor: pointer;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.form-error {
    font-size: 0.75rem;
    color: var(--error);
    margin-top: 0.25rem;
}

/* Error/Success boxes */
.error-box {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.success-box {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

/* Video card */
.video-card {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-card.locked {
    opacity: 0.6;
}

.video-card-image {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--secondary);
    overflow: hidden;
}

.video-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card-duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.video-card-body {
    padding: 1rem;
}

.video-card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.video-card-belt {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.belt-basic      { background: #333; color: #fafafa; }
.belt-white      { background: #e5e5e5; color: #111; }
.belt-yellow     { background: #ffd700; color: #111; }
.belt-blue       { background: #1d4ed8; color: white; }
.belt-red        { background: #dc2626; color: white; }
.belt-brown      { background: #92400e; color: white; }
.belt-black_brown { background: #1a0a00; color: #fbbf24; border: 1px solid #92400e; }

/* Lock overlay */
.lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-icon {
    font-size: 2rem;
    color: white;
}

/* Tier cards */
.tier-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .tier-grid {
        grid-template-columns: 1fr;
    }
}

.tier-card {
    background: var(--card);
    border-radius: var(--radius);
    border: 2px solid var(--border);
    padding: 2rem;
    text-align: center;
}

.tier-card.featured {
    border-color: var(--primary);
    position: relative;
}

.tier-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tier-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tier-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
}

.tier-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

.tier-features {
    list-style: none;
    margin: 1.5rem 0;
    text-align: left;
}

.tier-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.tier-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* Video player */
.video-player-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}

.video-player-wrapper iframe,
.video-player-wrapper video {
    width: 100%;
    height: 100%;
}

/* Footer */
.footer {
    background: var(--secondary);
    color: white;
    padding: 1.5rem;
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
}

.footer a:hover {
    opacity: 1;
}

.footer-left, .footer-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Utility classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Admin styles */
.admin-nav {
    background: #1a1a1a;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.admin-nav a.active {
    background: var(--primary);
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
}

.table th, .table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--secondary);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.table tr:hover {
    background: #1f1f1f;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }
.badge-error   { background: rgba(239, 68, 68, 0.15);  color: #fca5a5; }
.badge-info    { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }