:root {
    --primary: #E91E63; /* Magenta */
    --secondary: #4A148C; /* Purple */
    --accent: #FF6D00; /* Orange */
    --black: #000000;
    --white: #FFFFFF;
    --bg: #F8F9FB;
    --card-bg: #FFFFFF;
    --card-border: #EEEEEE;
    --text-main: #1A1A1A;
    --text-muted: #666666;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    padding-bottom: 120px;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Decoration */
body::before {
    content: "";
    position: fixed;
    top: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(233, 30, 99, 0.05) 0%, transparent 70%);
    z-index: -1;
}

body::after {
    content: "";
    position: fixed;
    bottom: -10%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(74, 20, 140, 0.05) 0%, transparent 70%);
    z-index: -1;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    padding: 30px 20px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--card-border);
}

.title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    color: var(--black);
    line-height: 0.9;
}

h1 span {
    display: block;
    font-size: 1.2rem;
    color: var(--primary);
}

.instruction {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.5;
    font-weight: 400;
}

.view-results-link {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    margin-top: 10px;
    transition: var(--transition);
}

.view-results-link:hover {
    text-decoration: underline;
    transform: translateX(5px);
}

.selection-badge {
    background: var(--black);
    color: var(--white);
    padding: 8px 24px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.selection-badge.complete {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 10px 25px rgba(233, 30, 99, 0.3);
}

/* Container */
.container {
    max-width: 600px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Groups */
.position-group {
    margin-bottom: 25px;
    background: var(--card-bg);
    border-radius: 24px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 20px 24px;
    background: var(--white);
    transition: var(--transition);
}

.position-title {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--black);
    letter-spacing: 0.5px;
}

.chevron {
    color: var(--text-muted);
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.position-group:not(.collapsed) .chevron {
    transform: rotate(180deg);
}

.player-grid-container {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid var(--card-border);
}

.position-group.collapsed .player-grid-container {
    max-height: 0;
}

/* Player Cards */
.player-grid {
    display: grid;
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 8px;
}

.player-card {
    background: transparent;
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition);
}

.player-card:hover {
    background: rgba(0, 0, 0, 0.02);
}

.player-card.selected {
    background: rgba(233, 30, 99, 0.05);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.player-avatar {
    width: 44px;
    height: 44px;
    background: var(--bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: var(--secondary);
    font-size: 1.2rem;
    border: 1px solid var(--card-border);
}

.selected .player-avatar {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
}

.player-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--black);
}

.checkbox-visual {
    width: 26px;
    height: 26px;
    border: 2.5px solid var(--card-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.selected .checkbox-visual {
    background: var(--primary);
    border-color: var(--primary);
}

.selected .checkbox-visual::after {
    content: "✓";
    color: var(--white);
    font-size: 14px;
    font-weight: 900;
}

/* Footer CTA */
.footer-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 20px;
    background: linear-gradient(transparent, var(--bg) 60%);
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 90;
}

.confirm-btn {
    background: var(--white);
    color: var(--text-muted);
    border: 1px solid var(--card-border);
    padding: 20px 50px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: not-allowed;
    transition: var(--transition);
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.confirm-btn.active {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    cursor: pointer;
}

.confirm-btn.active:hover {
    transform: scale(1.05);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
}

.modal-content {
    background: var(--white);
    width: 100%;
    max-width: 450px;
    border-radius: 32px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}

.modal-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 24px;
    color: var(--black);
    text-transform: uppercase;
}

.modal-list {
    text-align: left;
    margin-bottom: 30px;
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg);
    padding: 20px;
    border-radius: 20px;
}

.modal-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-weight: 700;
}

.email-section {
    margin-bottom: 25px;
    text-align: left;
}

.email-section label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 700;
}

.email-section input {
    width: 100%;
    background: var(--bg);
    border: 2px solid var(--card-border);
    padding: 16px;
    border-radius: 16px;
    color: var(--black);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.email-section input:focus {
    border-color: var(--primary);
}

.final-confirm-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    width: 100%;
    padding: 20px;
    border-radius: 18px;
    font-weight: 900;
    font-size: 1.2rem;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 12px 25px rgba(233, 30, 99, 0.3);
}

/* Success Screen */
.success-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    z-index: 3000;
    text-align: center;
}

.success-icon {
    font-size: 6rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.success-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--black);
    margin-bottom: 20px;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.back-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

/* Stats Page Bars */
.stat-card {
    background: var(--white);
    margin-bottom: 10px;
    border-radius: 16px;
}

.stat-bar-bg {
    height: 12px;
    background: var(--bg);
    border-radius: 6px;
}

.stat-bar-fill {
    background: linear-gradient(90deg, var(--secondary), var(--primary), var(--accent));
    border-radius: 6px;
}

.stat-percentage {
    font-weight: 900;
    color: var(--primary);
    font-size: 1.1rem;
    min-width: 45px;
    text-align: right;
}

.stat-category-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    color: var(--black);
    opacity: 0.8;
}

.stat-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    margin-left: 20px;
}

.stats-btn {
    background: var(--black);
    color: var(--white);
    border: none;
    padding: 18px 35px;
    border-radius: 14px;
    font-weight: 900;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: var(--transition);
}

.stats-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    .position-header { padding: 16px 20px; }
}
