/* ========================================
   STREAMEAST - Toriso.org Style Design
   Only CSS - All PHP functions unchanged
   ======================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #fff;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* === Header === */
.header {
    background: #b91c1c;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo::before {
    content: 'STREAMEAST';
}

/* === Navigation === */
.nav {
    display: flex;
    gap: 2px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(0,0,0,0.2);
}

/* === Hamburger === */
.hamburger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* === Mobile Nav === */
.mobile-nav {
    display: none;
    position: fixed;
    top: 56px;
    left: -100%;
    width: 280px;
    height: calc(100vh - 56px);
    background: #b91c1c;
    flex-direction: column;
    transition: left 0.3s;
    overflow-y: auto;
    z-index: 998;
}

.mobile-nav.active {
    left: 0;
}

.mobile-nav .nav-link {
    padding: 16px 20px;
    border-radius: 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* === Main === */
.main {
    flex: 1;
    padding: 20px 0;
}

/* === Page Header === */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.page-subtitle {
    font-size: 16px;
    color: #999;
}

.page-stitle {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* === Event Container === */
.event-container {
    width: 100%;
}

/* === Section === */
.section {
    margin-bottom: 40px;
}

.section-header {
    margin-bottom: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
}

/* === Events List === */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* === Event Card === */
.event-card {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
    border-left: 4px solid transparent;
    width: 100%;
}

.event-card:hover {
    background: #222;
    border-left-color: #b91c1c;
}

.event-info {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 16px;
}

.league-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 8px;
    border: 2px solid #333;
    flex-shrink: 0;
}

.event-details {
    flex: 1;
    min-width: 0;
}

.event-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.event-datetime {
    font-size: 13px;
    color: #999;
    margin-bottom: 4px;
}

.event-league {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* === Event Status === */
.event-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.status-live {
    background: #ef4444;
    color: #fff;
    animation: pulse 2s infinite;
}

.status-upcoming {
    background: #b91c1c;
    color: #fff;
}

.status-finished {
    background: transparent;
    color: #666;
    padding: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* === No Events === */
.no-events,
.no-events-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* === Hero Section === */
.hero-section {
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 20px;
    text-align: center;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-datetime {
    font-size: 16px;
    color: #999;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.hero-venue {
    font-size: 14px;
    color: #999;
}

/* === Discord Button === */
.discord-btn {
    display: inline-block;
    background: #5865F2;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 20px;
    transition: background 0.2s;
}

.discord-btn:hover {
    background: #4752C4;
}

/* === Video Player === */
.video-player {
    margin-bottom: 20px;
}

.player-container {
    position: relative;
    padding-top: 56.25%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.player-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000;
}

/* === Stream Servers === */
.stream-servers {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.servers-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.servers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.server-btn {
    background: #0a0a0a;
    border: 2px solid transparent;
    padding: 16px;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.server-btn:hover {
    border-color: #b91c1c;
}

.server-btn.active {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* === Stream Links === */
.stream-links-section {
    margin-top: 30px;
}

.stream-links-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.stream-links-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    background: #1a1a1a;
}

.stream-links-table {
    width: 100%;
    border-collapse: collapse;
}

.stream-links-table thead {
    background: rgba(185, 28, 28, 0.1);
}

.stream-links-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 2px solid #333;
}

.stream-links-table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid #333;
}

.stream-link-row {
    cursor: pointer;
    transition: background 0.2s;
}

.stream-link-row:hover {
    background: #222;
}

.streamer-name {
    font-weight: 600;
}

.quality-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.quality-hd {
    background: #22c55e;
    color: #fff;
}

.quality-sd {
    background: #64748b;
    color: #fff;
}

.adblock-yes {
    color: #22c55e;
}

.adblock-no {
    color: #ef4444;
}

.watch-btn {
    display: inline-block;
    background: #b91c1c;
    color: #fff;
    padding: 6px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s;
}

.watch-btn:hover {
    background: #991b1b;
}

/* === 404 === */
.hero-404 {
    text-align: center;
    padding: 80px 20px;
}

.hero-404-title {
    font-size: 120px;
    font-weight: 900;
    color: #b91c1c;
    margin-bottom: 20px;
}

.hero-404-subtitle {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-404-text {
    font-size: 18px;
    color: #999;
    margin-bottom: 32px;
}

.btn-primary {
    display: inline-block;
    background: #b91c1c;
    color: #fff;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #991b1b;
}

/* === Legal Pages === */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.legal-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 32px 0 16px;
}

.legal-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 12px;
}

.legal-content p {
    margin-bottom: 16px;
    color: #999;
}

.legal-content ul {
    margin: 16px 0;
    padding-left: 24px;
}

.legal-content li {
    margin-bottom: 8px;
    color: #999;
}

.legal-content a {
    color: #b91c1c;
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

/* === Contact Form === */
.contact-form {
    background: #1a1a1a;
    padding: 32px;
    border-radius: 8px;
    margin: 32px 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: #0a0a0a;
    border: 2px solid #333;
    border-radius: 4px;
    color: #fff;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #b91c1c;
}

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

.contact-submit {
    background: #b91c1c;
    color: #fff;
    padding: 12px 32px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-submit:hover {
    background: #991b1b;
}

/* === FAQ === */
.faq-section {
    margin: 40px 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #1a1a1a;
    border-radius: 8px;
    margin-bottom: 12px;
}

.faq-question {
    width: 100%;
    padding: 20px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.faq-question:hover {
    background: #222;
}

.faq-arrow {
    transition: transform 0.3s;
    color: #b91c1c;
}

.faq-question[aria-expanded="true"] .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.active {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 20px 20px;
    color: #999;
}

/* === Footer === */
.footer {
    background: #1a1a1a;
    border-top: 1px solid #333;
    padding: 32px 0;
    margin-top: 60px;
}

.footer p {
    color: #999;
    font-size: 14px;
    margin-bottom: 12px;
}

.footer strong {
    color: #fff;
}

.footer a {
    color: #b91c1c;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* === Responsive === */
@media (max-width: 968px) {
    .hamburger {
        display: flex;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-nav {
        display: flex;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .hero-section {
        padding: 24px;
    }
    
    .hero-title {
        font-size: 22px;
    }
    
    .servers-list {
        grid-template-columns: 1fr;
    }
    
    .hero-404-title {
        font-size: 80px;
    }
    
    .contact-form {
        padding: 20px;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }
    
    .event-info {
        padding: 12px 16px;
    }
    
    .league-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .event-title {
        font-size: 14px;
    }
    
    .hero-404-title {
        font-size: 60px;
    }
}

/* === Utilities === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}