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

:root {
    --adit-primary: #2C7A7B;
    --adit-secondary: #1A5F7A;
    --adit-accent: #48BB78;
    --adit-yellow: #F6C90E;
    --adit-blue: #3A86FF;
    --adit-light: #FCFCFC;
    --adit-dark: #1A1A1A;
    --adit-success: #48BB78;
    --adit-error: #E53E3E;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--adit-secondary) 0%, var(--adit-primary) 50%, var(--adit-blue) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(72, 187, 120, 0.15) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.container {
    max-width: 900px;
    width: 100%;
    background: var(--adit-light);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.header {
    background: linear-gradient(135deg, var(--adit-secondary) 0%, var(--adit-primary) 100%);
    color: white;
    padding: 40px 30px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect fill="rgba(255,255,255,0.03)" width="50" height="50"/><rect fill="rgba(255,255,255,0.03)" x="50" y="50" width="50" height="50"/></svg>');
    opacity: 0.5;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.logo-area img {
    max-height: 60px;
    max-width: 280px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.subtitle {
    font-size: 16px;
    opacity: 0.95;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    margin-top: 25px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--adit-accent) 0%, var(--adit-yellow) 100%);
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(72, 187, 120, 0.5);
}

.content {
    padding: 40px;
}

.login-screen, .welcome-screen, .quiz-screen, .results-screen {
    display: none;
}

.login-screen.active, .welcome-screen.active, .quiz-screen.active, .results-screen.active {
    display: block;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.welcome-content {
    text-align: center;
}

.welcome-icon {
    font-size: 72px;
    color: var(--adit-primary);
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.welcome-content h2 {
    color: var(--adit-secondary);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.welcome-content p {
    color: var(--adit-dark);
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 40px;
    opacity: 0.85;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--adit-primary), var(--adit-accent));
    color: white;
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmerStat 3s infinite;
}

@keyframes shimmerStat {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card .number {
    font-size: 48px;
    font-weight: 800;
    display: block;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-card .label {
    font-size: 14px;
    opacity: 0.95;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-box {
    background: linear-gradient(135deg, rgba(44, 122, 123, 0.1), rgba(72, 187, 120, 0.1));
    border-left: 4px solid var(--adit-primary);
    padding: 20px;
    border-radius: 12px;
    font-size: 16px;
    color: var(--adit-dark);
    margin: 30px 0;
    text-align: left;
}

.info-box i {
    color: var(--adit-accent);
    margin-right: 10px;
    font-size: 20px;
}

.btn {
    border: none;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Inter', sans-serif;
}

.btn i {
    font-size: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--adit-primary), var(--adit-accent));
    color: white;
    box-shadow: 0 4px 15px rgba(44, 122, 123, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--adit-accent), var(--adit-primary));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 122, 123, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--adit-blue), var(--adit-secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(58, 134, 255, 0.4);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--adit-secondary), var(--adit-blue));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(58, 134, 255, 0.6);
}

.btn:active {
    transform: translateY(0);
}

.question-container {
    margin-bottom: 30px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.question-number {
    color: var(--adit-primary);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.question-score {
    background: linear-gradient(135deg, var(--adit-accent), var(--adit-yellow));
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.question-score i {
    color: var(--adit-yellow);
    filter: drop-shadow(0 0 2px rgba(246, 201, 14, 0.5));
}

.question-text {
    color: var(--adit-secondary);
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 30px;
    line-height: 1.5;
}

.options {
    display: grid;
    gap: 15px;
}

.option {
    background: white;
    border: 3px solid #e8e8e8;
    padding: 20px 25px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 17px;
    color: var(--adit-dark);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
    transition: left 0.5s ease;
}

.option:hover::before {
    left: 100%;
}

.option:hover {
    border-color: var(--adit-primary);
    transform: translateX(10px);
    box-shadow: 0 4px 15px rgba(44, 122, 123, 0.2);
    background: linear-gradient(135deg, rgba(44, 122, 123, 0.03), rgba(72, 187, 120, 0.03));
}

.option.selected {
    border-color: var(--adit-primary);
    background: linear-gradient(135deg, rgba(44, 122, 123, 0.15), rgba(72, 187, 120, 0.15));
    box-shadow: 0 4px 15px rgba(44, 122, 123, 0.3);
}

.option.correct {
    border-color: var(--adit-success);
    background: linear-gradient(135deg, rgba(6, 214, 160, 0.15), rgba(6, 214, 160, 0.2));
    animation: correctPulse 0.6s ease;
}

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

.option.incorrect {
    border-color: var(--adit-error);
    background: linear-gradient(135deg, rgba(239, 71, 111, 0.15), rgba(239, 71, 111, 0.2));
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.option.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.feedback-box {
    margin: 25px 0;
    padding: 25px;
    border-radius: 16px;
    font-size: 16px;
    line-height: 1.7;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-box.correct {
    background: linear-gradient(135deg, rgba(6, 214, 160, 0.15), rgba(6, 214, 160, 0.2));
    border-left: 5px solid var(--adit-success);
    color: var(--adit-dark);
}

.feedback-box.incorrect {
    background: linear-gradient(135deg, rgba(239, 71, 111, 0.15), rgba(239, 71, 111, 0.2));
    border-left: 5px solid var(--adit-error);
    color: var(--adit-dark);
}

.next-btn-container {
    text-align: center;
    margin-top: 35px;
}

.card-collection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.member-card {
    background: white;
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
}

.member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--adit-primary), var(--adit-accent));
}

.member-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--adit-primary);
}

.member-card.locked {
    opacity: 0.5;
    filter: grayscale(100%) brightness(0.9);
    cursor: not-allowed;
}

.member-card.locked:hover {
    transform: none;
    border-color: transparent;
}

.member-card.unlocked {
    animation: cardUnlock 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardUnlock {
    0% { 
        transform: scale(0.8) rotateY(90deg); 
        opacity: 0; 
    }
    50% { 
        transform: scale(1.15) rotateY(0deg); 
    }
    100% { 
        transform: scale(1) rotateY(0deg); 
        opacity: 1; 
    }
}

.card-image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    border: 5px solid var(--adit-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
}

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

.card-image.locked-img {
    border-color: #ccc;
}

.card-name {
    font-size: 19px;
    font-weight: 700;
    color: var(--adit-secondary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-role {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
    min-height: 36px;
}

.card-badge {
    display: inline-block;
    background: var(--adit-accent);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-badge.super {
    background: linear-gradient(135deg, var(--adit-yellow), var(--adit-accent));
    box-shadow: 0 4px 15px rgba(246, 201, 14, 0.4);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.card-badge.honra {
    background: linear-gradient(135deg, var(--adit-blue), var(--adit-secondary));
}

.results-content {
    text-align: center;
}

.results-icon {
    font-size: 80px;
    color: var(--adit-accent);
    margin-bottom: 20px;
    animation: zoomIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.results-content h2 {
    color: var(--adit-secondary);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
}

.score-display {
    background: linear-gradient(135deg, var(--adit-primary), var(--adit-accent));
    color: white;
    padding: 50px 40px;
    border-radius: 24px;
    margin: 40px 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.score-display::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: rotateSlow 20s linear infinite;
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.score-display .score {
    font-size: 80px;
    font-weight: 800;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    animation: scoreCount 1s ease;
}

@keyframes scoreCount {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.score-display .score-label {
    font-size: 24px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.score-display .score-percentage {
    font-size: 28px;
    font-weight: 700;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}

.score-message {
    font-size: 26px;
    color: var(--adit-secondary);
    margin: 35px 0;
    font-weight: 600;
}

.cards-earned {
    font-size: 20px;
    color: var(--adit-dark);
    margin-bottom: 30px;
    font-weight: 500;
}

.cards-earned i {
    color: var(--adit-accent);
    margin-right: 8px;
}

.collection-title {
    color: var(--adit-secondary);
    margin: 40px 0 30px;
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.collection-title i {
    color: var(--adit-primary);
}

.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .container {
        border-radius: 0;
        min-height: 100vh;
    }

    .content {
        padding: 25px 20px;
    }

    .header {
        padding: 30px 20px 25px;
    }

    .logo-area {
        font-size: 28px;
        letter-spacing: 2px;
    }

    .subtitle {
        font-size: 14px;
    }

    .welcome-content h2,
    .results-content h2 {
        font-size: 26px;
    }

    .welcome-content p {
        font-size: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 25px 20px;
    }

    .stat-card .number {
        font-size: 42px;
    }

    .question-text {
        font-size: 22px;
    }

    .card-collection {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px;
    }

    .card-image {
        width: 110px;
        height: 110px;
        font-size: 44px;
    }

    .card-name {
        font-size: 16px;
    }

    .card-role {
        font-size: 12px;
    }

    .btn {
        padding: 16px 32px;
        font-size: 16px;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .score-display {
        padding: 40px 30px;
    }

    .score-display .score {
        font-size: 64px;
    }

    .score-display .score-label {
        font-size: 20px;
    }

    .score-message {
        font-size: 22px;
    }

    .question-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .option {
        padding: 18px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .logo-area {
        font-size: 24px;
    }

    .welcome-content h2,
    .results-content h2 {
        font-size: 22px;
    }

    .question-text {
        font-size: 20px;
    }

    .card-collection {
        grid-template-columns: 1fr;
    }

    .score-display .score {
        font-size: 56px;
    }
}

/* Login Screen Styles */
.login-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.login-icon {
    font-size: 72px;
    color: var(--adit-primary);
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

.login-content h2 {
    color: var(--adit-secondary);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.login-content p {
    color: var(--adit-dark);
    font-size: 16px;
    margin-bottom: 30px;
    opacity: 0.85;
}

#loginForm {
    margin-bottom: 40px;
}

.input-group {
    margin-bottom: 25px;
    text-align: left;
}

.input-group label {
    display: block;
    color: var(--adit-secondary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--adit-primary);
    box-shadow: 0 0 0 3px rgba(44, 122, 123, 0.1);
}

.ranking-preview {
    background: linear-gradient(135deg, rgba(44, 122, 123, 0.05), rgba(72, 187, 120, 0.05));
    border: 2px solid var(--adit-primary);
    border-radius: 16px;
    padding: 25px;
    margin-top: 40px;
}

.ranking-preview h3 {
    color: var(--adit-secondary);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ranking-preview h3 i {
    color: var(--adit-yellow);
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ranking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.ranking-item:hover {
    transform: translateX(5px);
}

.ranking-item.top-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    font-weight: 700;
}

.ranking-item.top-2 {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
    color: white;
    font-weight: 600;
}

.ranking-item.top-3 {
    background: linear-gradient(135deg, #CD7F32, #B8733F);
    color: white;
    font-weight: 600;
}

.ranking-position {
    display: flex;
    align-items: center;
    gap: 15px;
}

.position-number {
    font-size: 24px;
    font-weight: 800;
    min-width: 35px;
}

.player-name {
    font-size: 16px;
}

.ranking-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.score-points {
    font-size: 20px;
    font-weight: 700;
}

.score-games {
    font-size: 12px;
    opacity: 0.8;
}

.ranking-section {
    margin: 40px 0;
}

.full-ranking {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    margin-bottom: 25px;
    max-height: 400px;
    overflow-y: auto;
}

.full-ranking::-webkit-scrollbar {
    width: 8px;
}

.full-ranking::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.full-ranking::-webkit-scrollbar-thumb {
    background: var(--adit-primary);
    border-radius: 10px;
}

.full-ranking::-webkit-scrollbar-thumb:hover {
    background: var(--adit-accent);
}

.player-stats {
    background: linear-gradient(135deg, rgba(44, 122, 123, 0.1), rgba(72, 187, 120, 0.1));
    border-left: 4px solid var(--adit-primary);
    padding: 20px;
    border-radius: 12px;
    text-align: left;
}

.player-stats h4 {
    color: var(--adit-secondary);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--adit-primary);
    display: block;
}

.stat-label {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.ranking-item.current-player {
    border: 3px solid var(--adit-accent);
    box-shadow: 0 0 20px rgba(72, 187, 120, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@media (max-width: 768px) {
    .login-content {
        padding: 0 10px;
    }

    .ranking-preview {
        padding: 20px;
    }

    .ranking-item {
        padding: 12px 15px;
    }

    .position-number {
        font-size: 20px;
        min-width: 30px;
    }

    .player-name {
        font-size: 14px;
    }

    .score-points {
        font-size: 18px;
    }

    .full-ranking {
        max-height: 300px;
    }
}