/* ==========================================================================
   ESTILOS PRINCIPAIS - DARK MODE & GLASSMORPHISM ESTILO JOTTATHON
   ========================================================================== */

:root {
    --bg-main: #0b0e14;
    --bg-card: rgba(18, 24, 38, 0.75);
    --bg-card-border: rgba(255, 255, 255, 0.08);
    --accent-purple: #9146FF;
    --accent-purple-hover: #772ce8;
    --accent-blue: #3b82f6;
    --accent-gold: #f59e0b;
    --text-white: #ffffff;
    --text-gray: #9ca3af;
    --text-dark-gray: #6b7280;
    --radius-lg: 16px;
    --radius-md: 10px;
    --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-white);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* NAVBAR */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 14, 20, 0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--bg-card-border);
    padding: 1rem 1.5rem;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-white);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #fff 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.live-badge {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #f87171;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pulse-dot {
    font-size: 0.5rem;
    animation: pulse 1.5s infinite;
}

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

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    border-bottom: 2px solid var(--accent-purple);
}

.btn-twitch {
    background-color: var(--accent-purple);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 10px 18px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-twitch:hover {
    background-color: var(--accent-purple-hover);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* HERO BANNER */
.hero-banner {
    position: relative;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(145, 70, 255, 0.15) 0%, rgba(11, 14, 20, 0.8) 100%),
                url('https://images.unsplash.com/photo-1511512578047-dfb367046420?auto=format&fit=crop&w=1400&q=80') center/cover;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    border: 1px solid var(--bg-card-border);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.live-pill .dot {
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 0.8rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn-primary {
    background-color: var(--accent-purple);
    color: white;
    text-decoration: none;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 10px;
    backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* SECTION HEADERS */
.section-header {
    margin-bottom: 2rem;
}

.section-header.center {
    text-align: center;
}

.section-header h2, .section-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.section-header p {
    color: var(--text-gray);
    font-size: 1rem;
}

/* DESAFIOS / GOALS GRID */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.goal-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.2s;
}

.goal-card:hover {
    border-color: rgba(145, 70, 255, 0.4);
}

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

.status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
}

.status-progress {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-done {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.target-value {
    font-weight: 800;
    color: var(--text-gray);
}

.goal-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.08);
    height: 10px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.progress-bar-fill {
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    height: 100%;
    border-radius: 20px;
    transition: width 0.8s ease-in-out;
}

.goal-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-gray);
}

.goal-footer strong {
    color: white;
}

/* TIMELINE */
.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    padding: 1.2rem 1.5rem;
    border-radius: var(--radius-md);
    align-items: center;
}

.timeline-item.active {
    border-color: var(--accent-purple);
    background: rgba(145, 70, 255, 0.08);
}

.time-box {
    background: rgba(255, 255, 255, 0.08);
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 800;
    color: var(--accent-purple);
}

.timeline-content h4 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.timeline-content p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* MULTIVIEW PAGE */
.multiview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.multiview-controls {
    display: flex;
    gap: 0.8rem;
}

.btn-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--bg-card-border);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-control:hover {
    background: rgba(255, 255, 255, 0.15);
}

.multiview-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
}

.multiview-layout.hide-chat {
    grid-template-columns: 1fr;
}

.multiview-layout.hide-chat .chat-section {
    display: none;
}

.video-section {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.main-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--bg-card-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.twitch-player-embed {
    width: 100%;
    height: 100%;
}

.active-cam-label {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 10;
}

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

.camera-card {
    position: relative;
    aspect-ratio: 16/9;
    background: #121826;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--bg-card-border);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-card:hover {
    border-color: rgba(145, 70, 255, 0.6);
}

.camera-card.active {
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(145, 70, 255, 0.4);
}

.cam-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 2;
}

.cam-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-gray);
    font-size: 0.8rem;
    text-align: center;
    padding: 5px;
}

.play-icon {
    font-size: 1.4rem;
    color: var(--accent-purple);
}

.cam-overlay-info {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 100%);
    padding: 6px 8px;
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-gray);
}

.live-dot {
    color: #4ade80;
    font-weight: 700;
}

.chat-section {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 550px;
}

.chat-header {
    background: rgba(0, 0, 0, 0.4);
    padding: 12px 16px;
    border-bottom: 1px solid var(--bg-card-border);
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-gray);
    letter-spacing: 0.5px;
}

.chat-iframe {
    width: 100%;
    flex: 1;
    min-height: 500px;
}

/* RANKINGS PAGE */
.rankings-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.ranking-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.ranking-card-header {
    margin-bottom: 1.2rem;
}

.text-gold { color: var(--accent-gold); }
.text-purple { color: var(--accent-purple); }

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

.ranking-table th {
    text-align: left;
    padding: 10px;
    color: var(--text-gray);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--bg-card-border);
}

.ranking-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.95rem;
}

.ranking-table tr.gold { background: rgba(245, 158, 11, 0.08); }
.ranking-table tr.silver { background: rgba(203, 213, 225, 0.05); }
.ranking-table tr.bronze { background: rgba(180, 83, 9, 0.05); }

.gold-crown { color: var(--accent-gold); }
.user-name { font-weight: 700; }
.user-value { text-align: right; font-weight: 800; color: #a7f3d0; }

/* SORTEIOS PAGE */
.giveaways-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.giveaway-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.giveaway-card.closed {
    opacity: 0.6;
}

.giveaway-icon {
    width: 70px;
    height: 70px;
    background: rgba(145, 70, 255, 0.15);
    border: 1px solid var(--accent-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent-purple);
    margin-bottom: 1.2rem;
}

.category-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent-purple);
    margin-bottom: 0.5rem;
}

.giveaway-body h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.req-text {
    font-size: 0.88rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.giveaway-timer {
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.btn-enter-giveaway {
    width: 100%;
    background: var(--accent-purple);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.btn-enter-giveaway:disabled {
    background: #374151;
    cursor: not-allowed;
}

/* FOOTER */
.site-footer {
    background: #07090e;
    border-top: 1px solid var(--bg-card-border);
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-gray);
    font-size: 0.9rem;
    max-width: 400px;
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.footer-socials a {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background 0.2s;
}

.footer-socials a:hover {
    background: var(--accent-purple);
}

.footer-bottom {
    text-align: center;
    color: var(--text-dark-gray);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
}

/* RESPONSIVO */
@media (max-width: 992px) {
    .multiview-layout {
        grid-template-columns: 1fr;
    }
    .cameras-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .mobile-toggle {
        display: block;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .cameras-grid {
        grid-template-columns: 1fr;
    }
}
