/* ========== CSS Variables ========== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #252540;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent: #ff4655;
    --accent-glow: rgba(255, 70, 85, 0.4);
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    --success: #00ff88;
    --danger: #ff4444;
    --border: rgba(255, 255, 255, 0.1);
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --twitch-purple: #9146ff;
    --discord-blue: #5865f2;
    --youtube-red: #ff0000;
    --twitter-blue: #1da1f2;
}

body.light-mode {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f0;
    --text-primary: #1a1a2e;
    --text-secondary: #555;
    --border: rgba(0, 0, 0, 0.1);
}

/* ========== Reset & Base ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ========== Dark Mode Toggle ========== */
.dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--bg-card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px var(--accent-glow);
}
.dark-mode-toggle:hover { transform: scale(1.1); }
.toggle-icon { font-size: 20px; position: absolute; transition: opacity 0.3s; }
.dark-mode .sun { opacity: 1; }
.dark-mode .moon { opacity: 0; }
.light-mode .sun { opacity: 0; }
.light-mode .moon { opacity: 1; }

/* ========== Navigation ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
}
.nav-container { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.nav-logo { text-decoration: none; }
.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 2px;
}
.nav-menu { display: flex; list-style: none; gap: 30px; }
.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
    position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 5px; }
.nav-toggle span { width: 25px; height: 2px; background: var(--text-primary); transition: 0.3s; }

/* ========== Hero Section ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a0a10 50%, var(--bg-primary) 100%);
    z-index: -2;
}
.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 40%, var(--accent-glow) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(255, 70, 85, 0.2) 0%, transparent 40%);
}
.hero-content { text-align: center; z-index: 1; }
.hero-logos { margin-bottom: 20px; }
.valorant-logo {
    width: 200px;
    max-width: 80%;
    height: auto;
    filter: drop-shadow(0 0 30px var(--accent-glow));
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.hero-title { margin-bottom: 10px; }
.title-main {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(3rem, 12vw, 7rem);
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: 10px;
    text-shadow: 0 0 40px var(--accent-glow);
    animation: glow 2s ease-in-out infinite alternate;
}
.title-sub {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 6vw, 3rem);
    font-weight: 400;
    color: var(--accent);
    letter-spacing: 15px;
}
.hero-tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    letter-spacing: 3px;
}

@keyframes glow {
    from { text-shadow: 0 0 20px var(--accent-glow), 0 0 40px var(--accent-glow); }
    to { text-shadow: 0 0 30px var(--accent-glow), 0 0 60px var(--accent-glow), 0 0 80px var(--accent-glow); }
}

/* ========== Countdown - Enhanced Large Version ========== */
.countdown-container {
    margin: 50px 0;
    padding: 50px 30px;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.9) 0%, rgba(18, 18, 26, 0.95) 100%);
    border: 2px solid var(--accent);
    border-radius: 25px;
    box-shadow: 0 0 60px var(--accent-glow),
                inset 0 0 60px rgba(255, 70, 85, 0.05);
    position: relative;
    overflow: hidden;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.countdown-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 50%);
    animation: countdownPulse 4s ease-in-out infinite;
    opacity: 0.3;
    pointer-events: none;
}

@keyframes countdownPulse {
    0%, 100% { transform: scale(0.8); opacity: 0.2; }
    50% { transform: scale(1.2); opacity: 0.4; }
}

.countdown-label {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 20px var(--accent-glow);
    position: relative;
    z-index: 1;
}

.countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.countdown-item {
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(26, 26, 46, 0.8) 100%);
    border: 2px solid rgba(255, 70, 85, 0.4);
    border-radius: 20px;
    padding: 30px 35px;
    min-width: 130px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.countdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.countdown-item:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 15px 50px rgba(255, 70, 85, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.countdown-value {
    display: block;
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent);
    text-shadow: 0 0 30px var(--accent-glow),
                 0 0 60px var(--accent-glow);
    line-height: 1;
    margin-bottom: 10px;
    animation: numberGlow 2s ease-in-out infinite alternate;
}

@keyframes numberGlow {
    from { text-shadow: 0 0 20px var(--accent-glow), 0 0 40px var(--accent-glow); }
    to { text-shadow: 0 0 30px var(--accent-glow), 0 0 60px var(--accent-glow), 0 0 80px var(--accent-glow); }
}

.countdown-unit {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.countdown-separator {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
    animation: separatorBlink 1s ease-in-out infinite;
}

@keyframes separatorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ========== CTA Button ========== */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--accent) 0%, #cc3344 100%);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 5px;
    transition: all 0.3s;
    box-shadow: 0 5px 30px var(--accent-glow);
}
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 10px 40px var(--accent-glow); }

/* ========== Sections ========== */
.section { padding: 100px 0; }
.alt-bg { background: var(--bg-secondary); }
.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    text-align: center;
    margin-bottom: 10px;
}
.accent { color: var(--accent); margin-right: 15px; }
.section-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 50px; font-size: 1.1rem; }

/* ========== Groups ========== */
.groups-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-bottom: 50px; }
.group-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}
.group-card:hover { transform: translateY(-5px); box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.group-header {
    background: linear-gradient(135deg, var(--accent) 0%, #cc3344 100%);
    padding: 15px 20px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.group-letter {
    width: 35px;
    height: 35px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}
.group-table { width: 100%; border-collapse: collapse; }
.group-table th, .group-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border); }
.group-table th { color: var(--text-secondary); font-size: 0.85rem; text-transform: uppercase; }
.group-table tr.qualified td:first-child { border-left: 3px solid var(--success); }
.group-table tr.eliminated { opacity: 0.5; }

/* Clickable team names in standings */
.group-table .team-name-cell {
    cursor: pointer;
    transition: color 0.2s ease;
}
.group-table .team-name-cell:hover {
    color: var(--accent);
}

/* Loading Cell */
.loading-cell {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    font-style: italic;
}

/* ========== Matches ========== */
.matches-title { font-family: var(--font-display); font-size: 1.5rem; text-align: center; margin-bottom: 30px; }
.matches-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.match-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}
.match-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(255, 70, 85, 0.2);
}
.match-card.upcoming { border-color: var(--gold); }
.match-time { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 10px; }
.match-group { color: var(--accent); font-size: 0.85rem; margin-bottom: 8px; font-weight: 600; text-transform: uppercase; }
.match-teams { display: flex; justify-content: center; align-items: center; gap: 15px; margin-bottom: 10px; font-weight: 600; }
.match-teams .winner { color: var(--success); }
.vs { color: var(--accent); font-family: var(--font-display); font-weight: 700; }
.match-score { font-family: var(--font-display); font-size: 1.5rem; color: var(--accent); }
.match-status { color: var(--gold); font-weight: 600; text-transform: uppercase; font-size: 0.9rem; }

/* ========== Bracket ========== */
.bracket { display: flex; justify-content: center; align-items: center; gap: 50px; flex-wrap: wrap; margin-bottom: 60px; }
.bracket-round { text-align: center; }
.bracket-round h4 { font-family: var(--font-display); margin-bottom: 20px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 2px; }
.bracket-round.finals h4 { color: var(--gold); }
.bracket-match {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 20px;
    min-width: 250px;
}
.bracket-match.final { border-color: var(--gold); box-shadow: 0 0 20px rgba(255, 215, 0, 0.2); }
.bracket-team {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    gap: 10px;
    border-radius: 5px;
    transition: background 0.3s;
}
.bracket-team.winner { background: rgba(0, 255, 136, 0.1); }
.bracket-team .seed { font-size: 0.75rem; color: var(--text-secondary); background: var(--bg-primary); padding: 3px 8px; border-radius: 3px; }
.bracket-team .score { margin-left: auto; font-family: var(--font-display); font-weight: 700; color: var(--accent); }

/* ========== Prizes ========== */
.prizes { text-align: center; }
.prizes h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 30px; }
.prizes-grid { display: flex; justify-content: center; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.prize-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 30px 40px;
    text-align: center;
    transition: transform 0.3s;
}
.prize-card:hover { transform: translateY(-10px); }
.prize-card.gold { border-color: var(--gold); order: 2; transform: scale(1.1); }
.prize-card.silver { border-color: var(--silver); order: 1; }
.prize-card.bronze { border-color: var(--bronze); order: 3; }
.prize-medal { font-size: 3rem; margin-bottom: 10px; }
.prize-place { color: var(--text-secondary); margin-bottom: 5px; }
.prize-amount { font-family: var(--font-display); font-size: 2rem; font-weight: 700; }
.prize-card.gold .prize-amount { color: var(--gold); }
.prize-card.silver .prize-amount { color: var(--silver); }
.prize-card.bronze .prize-amount { color: var(--bronze); }

/* ========== Info Grid ========== */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 50px; }
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
}
.info-card:hover { border-color: var(--accent); transform: translateY(-5px); }
.info-icon { font-size: 2.5rem; margin-bottom: 15px; }
.info-card h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 10px; color: var(--accent); }
.info-card p { color: var(--text-secondary); font-size: 0.95rem; margin: 5px 0; }

/* ========== Rules Accordion ========== */
.rules { max-width: 800px; margin: 0 auto; }
.rules h3 { font-family: var(--font-display); text-align: center; margin-bottom: 30px; font-size: 1.5rem; }
.accordion-item { margin-bottom: 10px; }
.accordion-btn {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 25px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}
.accordion-btn:hover { border-color: var(--accent); }
.accordion-btn span { color: var(--accent); font-size: 1.5rem; transition: transform 0.3s; }
.accordion-btn.active span { transform: rotate(45deg); }
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg-secondary);
    border-radius: 0 0 10px 10px;
}
.accordion-content ul { padding: 20px 25px 20px 45px; }
.accordion-content li { color: var(--text-secondary); margin: 10px 0; }

/* ========== Live & Social Section ========== */
.twitch-embed-container.full-width {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.subsection-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.subsection-title i {
    color: #9146ff;
}

.twitch-embed {
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16/9;
}

.twitch-embed iframe {
    display: block;
    border: none;
    border-radius: 10px;
    width: 100%;
    height: 100%;
    min-height: 400px;
}

/* Social Links Row */
.social-links-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 50px;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.social-btn i {
    font-size: 1.4rem;
}

.social-btn:hover {
    transform: translateY(-3px);
}

/* Social Button Colors */
.social-btn.twitch { border-color: #9146ff; }
.social-btn.twitch i { color: #9146ff; }
.social-btn.twitch:hover {
    background: #9146ff;
    color: white;
    box-shadow: 0 5px 25px rgba(145, 70, 255, 0.4);
}

.social-btn.discord { border-color: #5865f2; }
.social-btn.discord i { color: #5865f2; }
.social-btn.discord:hover {
    background: #5865f2;
    color: white;
    box-shadow: 0 5px 25px rgba(88, 101, 242, 0.4);
}

.social-btn.youtube { border-color: #ff0000; }
.social-btn.youtube i { color: #ff0000; }
.social-btn.youtube:hover {
    background: #ff0000;
    color: white;
    box-shadow: 0 5px 25px rgba(255, 0, 0, 0.4);
}

.social-btn.twitter { border-color: #1da1f2; }
.social-btn.twitter i { color: var(--text-primary); }
.social-btn.twitter:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    box-shadow: 0 5px 25px rgba(255, 255, 255, 0.2);
}

.social-link-card.twitter {
    color: var(--text-primary);
}
.social-link-card.twitter:hover {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 5px 25px rgba(255, 255, 255, 0.1);
}

/* ========== Footer ========== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 50px 0 30px;
}
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; margin-bottom: 30px; }
.footer-brand { display: flex; align-items: center; gap: 15px; }
.footer-logo { width: 50px; height: 50px; filter: drop-shadow(0 0 10px var(--accent-glow)); }
.footer-brand-text { font-family: var(--font-display); font-size: 1.5rem; color: var(--accent); }
.footer-brand-text span { display: block; font-family: var(--font-body); font-size: 0.9rem; color: var(--text-secondary); }

/* Footer Social - Clean styling without underscores */
.footer-social { display: flex; gap: 15px; }
.footer-social a {
    width: 45px;
    height: 45px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s;
}
.footer-social a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px var(--accent-glow);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.admin-link {
    color: var(--text-muted, #6a6a7a);
    text-decoration: none;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
    opacity: 0.6;
}
.admin-link:hover {
    color: var(--accent);
    opacity: 1;
}

/* ========== Team Members Modal ========== */
.team-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.team-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.team-modal-content {
    background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border: 1px solid var(--accent);
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(255, 70, 85, 0.15);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.team-modal-header {
    background: linear-gradient(135deg, var(--accent) 0%, #cc3344 100%);
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px 20px 0 0;
}

.team-modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.team-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.team-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.team-modal-body {
    padding: 25px;
}

.team-modal-group {
    text-align: center;
    padding: 10px 20px;
    background: rgba(255, 70, 85, 0.1);
    border: 1px solid rgba(255, 70, 85, 0.3);
    border-radius: 10px;
    color: var(--accent);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.team-modal-players {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.team-modal-player {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.team-modal-player:hover {
    background: rgba(255, 70, 85, 0.05);
    border-color: rgba(255, 70, 85, 0.3);
    transform: translateX(5px);
}

.player-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent) 0%, #cc3344 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.player-riot-id {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.player-riot-id .tag {
    color: var(--accent);
    font-family: var(--font-display);
}

/* ========== Match Details Modal ========== */
.match-modal-content {
    max-width: 700px;
}

.match-modal-teams {
    display: flex;
    align-items: stretch;
    gap: 20px;
}

.match-modal-team {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
}

.match-modal-team:hover {
    border-color: rgba(255, 70, 85, 0.3);
}

.match-modal-team.winner {
    border-color: var(--success);
    background: rgba(0, 255, 136, 0.05);
}

.match-modal-team-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.match-modal-team-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

.match-modal-team-score {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent);
}

.match-modal-team.winner .match-modal-team-score {
    color: var(--success);
}

.match-modal-players {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.match-modal-player {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.match-modal-player .player-number {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
}

.match-modal-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent);
    padding: 0 5px;
    text-shadow: 0 0 20px var(--accent-glow);
}

/* ========== Dashboard Grid System ========== */
.dashboard-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.dashboard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard-title {
    margin-bottom: 0;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
}

.dashboard-title i {
    color: var(--accent);
}

.dashboard-actions {
    display: flex;
    gap: 15px;
}

.dashboard-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dashboard-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.dashboard-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 5px 20px var(--accent-glow);
}

.reset-layout-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.dashboard-hint {
    margin-bottom: 30px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-align: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.dashboard-hint.editing {
    opacity: 1;
    color: var(--accent);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    position: relative;
}

/* Dashboard Widget */
.dashboard-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.dashboard-widget:hover {
    border-color: rgba(255, 70, 85, 0.3);
}

.dashboard-widget.widget-wide {
    grid-column: span 2;
}

/* Widget Header */
.widget-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(255, 70, 85, 0.15) 0%, rgba(255, 70, 85, 0.05) 100%);
    border-bottom: 1px solid var(--border);
}

.widget-drag-handle {
    display: none;
    color: var(--text-secondary);
    cursor: grab;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.widget-drag-handle:hover {
    background: rgba(255, 70, 85, 0.2);
    color: var(--accent);
}

.widget-drag-handle:active {
    cursor: grabbing;
}

.widget-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.widget-title i {
    color: var(--accent);
}

.widget-title .group-letter {
    width: 28px;
    height: 28px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

/* Widget Content */
.widget-content {
    padding: 20px;
    flex: 1;
    overflow: auto;
}

/* Widget Resize Handle */
.widget-resize-handle {
    display: none;
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: se-resize;
    background: linear-gradient(135deg, transparent 50%, var(--accent) 50%);
    border-radius: 0 0 15px 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dashboard-widget:hover .widget-resize-handle {
    opacity: 0.5;
}

.widget-resize-handle:hover {
    opacity: 1 !important;
}

/* Edit Mode Styles */
.dashboard-grid.edit-mode .widget-drag-handle {
    display: flex;
}

.dashboard-grid.edit-mode .widget-resize-handle {
    display: block;
}

.dashboard-grid.edit-mode .dashboard-widget {
    border: 2px dashed rgba(255, 70, 85, 0.4);
}

.dashboard-grid.edit-mode .dashboard-widget:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.dashboard-widget.dragging {
    opacity: 0.8;
    z-index: 1000;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4),
                0 0 30px var(--accent-glow);
    transform: scale(1.02);
}

.dashboard-widget.drag-over {
    border-color: var(--success) !important;
    background: rgba(0, 255, 136, 0.05);
}

/* Widget Drop Placeholder */
.widget-placeholder {
    background: rgba(255, 70, 85, 0.1);
    border: 2px dashed var(--accent);
    border-radius: 15px;
    min-height: 200px;
}

/* Compact Info Grid inside Widget */
.info-grid.compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 0;
}

.info-card.mini {
    padding: 15px;
    border-radius: 10px;
}

.info-card.mini .info-icon {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.info-card.mini h3 {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.info-card.mini p {
    font-size: 0.85rem;
    margin: 0;
}

/* Widget-specific adjustments */
.dashboard-widget .prizes {
    margin: 0;
}

.dashboard-widget .prizes h3 {
    display: none;
}

.dashboard-widget .prizes-grid {
    flex-wrap: wrap;
    justify-content: center;
}

.dashboard-widget .prize-card {
    padding: 20px 25px;
}

.dashboard-widget .prize-medal {
    font-size: 2rem;
}

.dashboard-widget .prize-amount {
    font-size: 1.5rem;
}

.dashboard-widget .bracket {
    margin-bottom: 0;
    flex-wrap: wrap;
    gap: 30px;
}

.dashboard-widget .rules {
    max-width: 100%;
}

.dashboard-widget .rules h3 {
    display: none;
}

.dashboard-widget .twitch-embed {
    border-radius: 10px;
}

.dashboard-widget .twitch-embed iframe {
    min-height: 350px;
}

.dashboard-widget .social-links-row {
    flex-wrap: wrap;
    justify-content: center;
}

.dashboard-widget .matches-grid {
    max-height: 400px;
    overflow-y: auto;
}

/* Widget Size Classes */
.dashboard-widget.size-small {
    grid-column: span 1;
}

.dashboard-widget.size-wide {
    grid-column: span 2;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        transform: translateY(-150%);
        transition: transform 0.3s;
    }
    .nav-menu.active { transform: translateY(0); }
    .nav-toggle { display: flex; }
    .countdown { gap: 5px; }
    .countdown-item { padding: 15px; min-width: 70px; }
    .countdown-value { font-size: 1.8rem; }
    .countdown-separator { font-size: 1.5rem; }
    .bracket { flex-direction: column; gap: 30px; }
    .prizes-grid { flex-direction: column; align-items: center; }
    .prize-card.gold { order: 0; transform: scale(1); }
    .footer-content { flex-direction: column; text-align: center; }
    .footer-brand { flex-direction: column; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }

    /* Live & Social Responsive */
    .live-social-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .social-links-grid {
        grid-template-columns: 1fr 1fr;
    }

    .twitch-embed iframe {
        height: 300px;
    }

    /* Modal Responsive */
    .match-modal-teams {
        flex-direction: column;
    }

    .match-modal-vs {
        padding: 10px 0;
    }

    /* Countdown Responsive */
    .countdown-container {
        padding: 35px 20px;
        margin: 30px 15px;
    }

    .countdown-label {
        font-size: 1.1rem;
        letter-spacing: 2px;
        margin-bottom: 20px;
    }

    .countdown {
        gap: 10px;
    }

    .countdown-item {
        padding: 20px 15px;
        min-width: 70px;
    }

    .countdown-value {
        font-size: 2.5rem;
    }

    .countdown-unit {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .countdown-separator {
        font-size: 2rem;
    }

    /* Dashboard Responsive */
    .dashboard-controls {
        flex-direction: column;
        text-align: center;
    }

    .dashboard-title {
        justify-content: center;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-widget.widget-wide {
        grid-column: span 1;
    }

    .info-grid.compact {
        grid-template-columns: 1fr;
    }

    .dashboard-btn span {
        display: none;
    }

    .dashboard-btn {
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .social-links-grid {
        grid-template-columns: 1fr;
    }

    .social-link-card {
        flex-direction: row;
        justify-content: flex-start;
        gap: 15px;
        padding: 15px 20px;
    }

    .social-link-card i {
        font-size: 1.8rem;
        margin-bottom: 0;
    }

    .social-link-card .social-name {
        font-size: 0.95rem;
    }

    .team-modal-content {
        max-width: 100%;
        margin: 10px;
    }

    .team-modal-header h3 {
        font-size: 1.2rem;
    }

    .match-modal-team-name {
        font-size: 1rem;
    }

    .match-modal-team-score {
        font-size: 2rem;
    }
}

/* Rank Points Grid */
.team-building-info {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.rank-points-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.rank-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.rank-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    transform: translateX(5px);
}

.rank-item.excluded {
    background: rgba(255, 70, 85, 0.1);
    border-color: rgba(255, 70, 85, 0.3);
}

.rank-item.excluded .rank-points {
    color: #ff4655;
    font-weight: 600;
}

.rank-name {
    font-weight: 500;
    color: var(--text-primary);
}

.rank-points {
    font-weight: 600;
    color: var(--accent);
    background: rgba(255, 70, 85, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .rank-points-grid {
        grid-template-columns: 1fr;
    }
    
    .team-building-info {
        padding: 15px;
    }
}
