/* Navbar */
.navbar {
    background: linear-gradient(135deg, rgba(10, 35, 70, 0.95), rgba(15, 25, 50, 0.95));
    backdrop-filter: blur(20px);
    padding: 0.8rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(78, 205, 196, 0.2);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.glitch-mini {
    font-size: 1.6rem;
    font-weight: 900;
    color: #ff6b6b;
    text-shadow: 1px 1px 0 #4ecdc4;
    letter-spacing: -1px;
}

.nav-logo span {
    font-size: 0.75rem;
    opacity: 0.6;
    color: #4ecdc4;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
    border-color: rgba(78, 205, 196, 0.2);
    transform: translateY(-1px);
}

.nav-link.active {
    color: #4ecdc4;
    background: rgba(78, 205, 196, 0.12);
    border-color: rgba(78, 205, 196, 0.35);
}

/* Botão de login em destaque na navbar da home */
.nav-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 107, 107, 0.35);
}

/* Botão "Sair" da navbar da home (fora do .nav-menu, não deve virar width:100% no mobile) */
.nav-logout-btn {
    background: transparent;
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: rgba(255, 107, 107, 0.8);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-logout-btn:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: #ff6b6b;
    color: #ff6b6b;
    transform: translateY(-1px);
}

.btn-logout {
    background: transparent;
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: rgba(255, 107, 107, 0.8);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
}

.btn-logout:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: #ff6b6b;
    color: #ff6b6b;
    transform: translateY(-1px);
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#userName {
    font-size: 0.9rem;
    font-weight: 500;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(78, 205, 196, 0.25);
}

.user-avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(78, 205, 196, 0.4);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Menu sanduíche (mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    background: rgba(78, 205, 196, 0.08);
    border: 1px solid rgba(78, 205, 196, 0.25);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
}

.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: #4ecdc4;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-toggle:focus-visible {
    outline: 2px solid #4ecdc4;
    outline-offset: 2px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin: 2rem 0 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.15);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.stat-info p {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Quizzes Grid */
.quizzes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.quiz-card {
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.5), rgba(26, 26, 46, 0.5));
    border: 1px solid rgba(78, 205, 196, 0.15);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.quiz-card:hover {
    transform: translateY(-8px);
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.7), rgba(26, 26, 46, 0.7));
    border-color: rgba(78, 205, 196, 0.3);
    box-shadow: 0 8px 30px rgba(78, 205, 196, 0.2);
}

.quiz-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #ff6b6b;
    padding-right: 60px;
    padding-top: 30px;
}

.quiz-card p {
    opacity: 0.7;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.quiz-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    opacity: 0.6;
    flex-wrap: wrap;
}

.quiz-actions {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.2rem;
}

.quiz-actions button {
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 5px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    color: white;
    transition: all 0.3s;
}

.quiz-actions button:hover {
    background: #ff6b6b;
    transform: scale(1.05);
}

/* Question Creator */
.quiz-creator {
    max-width: 800px;
    margin: 0 auto;
}

/* Botões Salvar/Cancelar do quiz (rodapé da pagina de criacao) */
.quiz-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.form-card {
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.6), rgba(26, 26, 46, 0.6));
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.form-card input, .form-card textarea {
    width: 100%;
    margin: 0.5rem 0;
    padding: 0.8rem;
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: 10px;
    background: rgba(255,255,255,0.95);
    color: #1a1a2e;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.2s ease;
}

.form-card textarea {
    resize: vertical;
    font-family: 'Montserrat', sans-serif;
}

.form-card input:focus, .form-card textarea:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 160px;
    margin-bottom: 0;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-check input {
    width: auto;
    margin: 0;
    cursor: pointer;
}

/* Questions List */
.questions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.questions-list {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 1rem;
    min-height: 200px;
}

.question-item {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.question-text {
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-right: 80px;
    word-break: break-word;
}

.question-meta {
    font-size: 0.8rem;
    opacity: 0.6;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.question-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.empty-questions {
    text-align: center;
    padding: 2rem;
    opacity: 0.7;
}

/* Modal Large */
.modal-large {
    max-width: 600px;
    width: 90%;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Options Group */
.options-group {
    margin: 1rem 0;
}

.option-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.option-item input[type="text"] {
    flex: 1;
    padding: 0.7rem;
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: 5px;
    background: rgba(255,255,255,0.95);
    color: #1a1a2e;
    transition: all 0.3s ease;
}

.option-item input[type="text"]:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 8px rgba(78, 205, 196, 0.3);
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.remove-option {
    background: rgba(255,107,107,0.2);
    border: 1px solid rgba(255,107,107,0.3);
    border-radius: 5px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    color: #ff6b6b;
    transition: all 0.2s;
    font-weight: 500;
}

.remove-option:hover {
    background: rgba(255,107,107,0.3);
    border-color: #ff6b6b;
    color: white;
    transform: scale(1.05);
}

/* Host Layout */
.host-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.host-controls, .host-players-col, .host-stats-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.control-card, .status-card {
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.6), rgba(26, 26, 46, 0.6));
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(78, 205, 196, 0.1);
    transition: all 0.3s ease;
}

.room-code-display {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.room-code-display span {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 4px;
    background: rgba(0,0,0,0.3);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-family: monospace;
}

.game-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timer-display {
    margin-top: 1rem;
    text-align: center;
}

.timer-bar {
    width: 100%;
    height: 4px;
    background: #ff6b6b;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.players-list, .ranking-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 1rem 0;
}

.player-item, .ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: rgba(78, 205, 196, 0.08);
    border: 1px solid rgba(78, 205, 196, 0.15);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.player-item:hover, .ranking-item:hover {
    background: rgba(78, 205, 196, 0.12);
    border-color: rgba(78, 205, 196, 0.3);
}

.player-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.8rem;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    flex-shrink: 0;
}

/* Player Screens */
.player-body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    overflow: hidden;
}

.player-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1rem;
}

.player-screen {
    display: none;
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.player-screen.active {
    display: block;
}

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

.join-card, .profile-card, .waiting-card, .question-container, .result-card, .final-card {
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.6), rgba(26, 26, 46, 0.6));
    border: 1px solid rgba(78, 205, 196, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(78, 205, 196, 0.1);
}

.code-input-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.code-input-group input {
    flex: 1;
    padding: 1rem;
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 2px;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 10px;
    color: #1a1a2e;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.code-input-group input:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 4px 20px rgba(78, 205, 196, 0.4);
    background: white;
}

.code-input-group button {
    min-width: 120px;
}

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

.avatar-option {
    cursor: pointer;
    text-align: center;
    padding: 1rem;
    border: 2px solid rgba(78, 205, 196, 0.15);
    border-radius: 10px;
    transition: all 0.3s;
    background: rgba(78, 205, 196, 0.08);
}

.avatar-option:hover {
    background: rgba(78, 205, 196, 0.15);
    border-color: rgba(78, 205, 196, 0.3);
    transform: scale(1.05);
}

.avatar-option.selected {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.25), rgba(78, 205, 196, 0.15));
    border: 2px solid #4ecdc4;
}

.avatar-emoji {
    font-size: 3rem;
}

.avatar-name {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.nickname-input input {
    width: 100%;
    padding: 0.8rem;
    margin: 1rem 0;
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 10px;
    text-align: center;
    font-size: 1.1rem;
    color: #1a1a2e;
    background: rgba(255,255,255,0.95);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.nickname-input input:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 4px 20px rgba(78, 205, 196, 0.4);
    background: white;
}

/* Question Screen */
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.timer-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15), rgba(78, 205, 196, 0.05));
    border: 2px solid rgba(78, 205, 196, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    position: relative;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.2);
}

.timer-circle::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 3px solid #4ecdc4;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.2); opacity: 0; }
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.option-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 15px;
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.option-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.3);
    transform: scale(1.02);
}

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

.option-letter {
    font-weight: bold;
    font-size: 1.2rem;
    background: rgba(0,0,0,0.3);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.option-text {
    flex: 1;
    font-size: 1rem;
}

/* Loading Spinner (adicional) */
.loading-spinner {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    grid-column: 1 / -1;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: #ff6b6b;
}

.empty-state p {
    margin-bottom: 1rem;
    opacity: 0.7;
}

/* Player waiting list */
.players-list-mini {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 1rem;
}

.player-item-mini {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.player-avatar-mini {
    font-size: 1.5rem;
}

/* Waiting animation */
.waiting-animation {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.pulse {
    width: 60px;
    height: 60px;
    background: #ff6b6b;
    border-radius: 50%;
    animation: pulseScale 1.5s infinite;
}

@keyframes pulseScale {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Room info */
.room-info {
    margin: 1rem 0;
    padding: 0.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

/* Feedback message */
.feedback-message {
    margin-top: 1rem;
    text-align: center;
    display: none;
}

.feedback {
    padding: 1rem;
    border-radius: 10px;
    animation: slideIn 0.3s ease;
}

.feedback.correct {
    background: rgba(72, 187, 120, 0.3);
    border-left: 4px solid #48bb78;
}

.feedback.incorrect {
    background: rgba(245, 101, 101, 0.3);
    border-left: 4px solid #f56565;
}

.feedback-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

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

/* Result screen */
.result-card {
    text-align: center;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.points-earned {
    font-size: 2rem;
    font-weight: bold;
    color: #ff6b6b;
    margin: 1rem 0;
}

.correct-answer {
    padding: 1rem;
    background: rgba(72, 187, 120, 0.2);
    border-radius: 10px;
    margin: 1rem 0;
}

.next-question-timer {
    margin-top: 2rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

#nextTimer {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff6b6b;
}

/* Final ranking */
.final-ranking {
    margin: 2rem 0;
}

.ranking-list-large {
    max-height: 400px;
    overflow-y: auto;
}

.ranking-list-large .ranking-item {
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: rgba(78, 205, 196, 0.08);
    border: 1px solid rgba(78, 205, 196, 0.15);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.ranking-list-large .ranking-item:hover {
    background: rgba(78, 205, 196, 0.12);
    border-color: rgba(78, 205, 196, 0.3);
}

.ranking-list-large .ranking-item.current-player {
    background: rgba(78, 205, 196, 0.2);
    border: 1px solid rgba(78, 205, 196, 0.4);
}

.ranking-position {
    font-weight: bold;
    font-size: 1.2rem;
    width: 50px;
}

.ranking-score {
    font-weight: bold;
    color: #ff6b6b;
}

/* Quiz info badge */
.quiz-info-badge {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15), rgba(78, 205, 196, 0.05));
    border: 1px solid rgba(78, 205, 196, 0.2);
    padding: 0.7rem 1.2rem;
    border-radius: 20px;
    display: inline-block;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.1);
}

/* Current question display */
.current-question {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(78, 205, 196, 0.05));
    border: 1px solid rgba(78, 205, 196, 0.15);
    border-radius: 10px;
}

.current-question strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #ff6b6b;
}

.current-question p {
    margin: 0.5rem 0;
    word-break: break-word;
}

/* Stat items */
.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Form group */
.form-group {
    margin-bottom: 1rem;
}

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

.form-group small {
    display: block;
    margin-top: 0.25rem;
    opacity: 0.6;
    font-size: 0.8rem;
}

/* Player logo */
.player-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.player-logo h1 {
    font-size: 3rem;
}

.player-logo p {
    opacity: 0.7;
}

/* Score display */
.score-display {
    font-size: 1.2rem;
    font-weight: bold;
    background: rgba(0,0,0,0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Question card */
.question-card {
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.5), rgba(26, 26, 46, 0.5));
    border: 1px solid rgba(78, 205, 196, 0.15);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.question-card h2 {
    font-size: 1.5rem;
    line-height: 1.4;
    word-break: break-word;
}

/* Cabeçalho do card de pergunta (tag de domínio + botão de report) */
.question-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--kink-space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--kink-space-sm);
}

.question-card-top .exam-domain-tag {
    margin-bottom: 0;
}

.report-question-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--kink-radius-pill);
    cursor: pointer;
    transition: var(--kink-transition);
    white-space: nowrap;
    font-family: 'Montserrat', sans-serif;
}

.report-question-btn:hover,
.report-question-btn:focus-visible {
    color: var(--kink-coral);
    border-color: rgba(255, 107, 107, 0.4);
    background: rgba(255, 107, 107, 0.1);
    outline: none;
}

.report-question-preview {
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--kink-coral);
    border-radius: var(--kink-radius-sm);
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.85;
    line-height: 1.5;
}

/* Placeholder */
.placeholder {
    text-align: center;
    opacity: 0.5;
    padding: 1rem;
}

/* Players count */
.players-count {
    margin-top: 1rem;
    text-align: center;
    font-weight: bold;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(78, 205, 196, 0.2);
}

/* Responsive */
@media (max-width: 1024px) {
    .host-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .container {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        text-align: left;
    }

    .nav-toggle {
        display: flex;
        order: 2;
    }

    .user-info {
        order: 1;
        margin-left: auto;
    }

    /* Nas páginas internas o nome brigaria por espaço com o hambúrguer.
       Na landing (.navbar-landing, sem hambúrguer) há espaço — lá quem manda
       é o JS do login, para o estado deslogado também funcionar. */
    .navbar:not(.navbar-landing) #userName {
        display: none !important;
    }

    .nav-menu {
        order: 4;
        flex-basis: 100%;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0.4rem;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.25s ease, visibility 0s linear 0.3s;
    }

    .nav-menu.open {
        max-height: 70vh;
        overflow-y: auto;
        opacity: 1;
        visibility: visible;
        margin-top: 0.85rem;
        transition: max-height 0.3s ease, opacity 0.25s ease, visibility 0s linear 0s;
    }

    .nav-link,
    .btn-logout {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .avatars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .room-code-display span {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }
    
    .question-card h2 {
        font-size: 1.2rem;
    }
    
    .option-btn {
        padding: 0.8rem;
    }
    
    .option-text {
        font-size: 0.9rem;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .code-input-group {
        flex-direction: column;
    }
    
    .code-input-group button {
        width: 100%;
    }
    
    .quiz-actions {
        position: static;
        justify-content: flex-end;
        margin-bottom: 0.5rem;
    }

    .quiz-card h3 {
        padding-right: 0;
        padding-top: 0;
    }

    .question-text {
        padding-right: 0;
    }

    .question-actions {
        position: static;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }

    .quiz-form-actions {
        flex-direction: column-reverse;
    }

    .quiz-form-actions .btn {
        width: 100%;
        margin: 0;
    }

    .modal-buttons {
        flex-direction: column-reverse;
    }

    .modal-buttons .btn {
        width: 100%;
        margin: 0;
    }

    /* Opcao de resposta: input em linha cheia, radio + remover abaixo */
    .option-item {
        flex-wrap: wrap;
    }

    .option-item input[type="text"] {
        flex: 1 1 100%;
        order: 1;
    }

    .radio-label {
        order: 2;
    }

    .remove-option {
        order: 3;
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.8rem 1rem;
    }
    
    .glitch-mini {
        font-size: 1.2rem;
    }
    
    .nav-logo span {
        font-size: 0.7rem;
    }
    
    .nav-link {
        font-size: 0.8rem;
    }
    
    .btn-logout {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        font-size: 1.8rem;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
    
    .quiz-card {
        padding: 1rem;
    }
    
    .option-letter {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .timer-circle {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .score-display {
        font-size: 1rem;
    }
    
    .player-screen {
        padding: 1rem;
    }

    .join-card, .profile-card, .waiting-card {
        padding: 1rem;
    }

    .control-card, .status-card, .form-card {
        padding: 1rem;
    }

    .questions-list {
        padding: 0.5rem;
    }

    .question-item {
        padding: 0.75rem;
    }

    .empty-questions {
        padding: 1.5rem 1rem;
    }

    .room-code-display span {
        font-size: 1rem;
        letter-spacing: 1px;
        padding: 0.4rem 0.8rem;
    }
}
/* ✅ NOVO: Estilos para Gráfico de Estatísticas de Respostas */
.stats-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.5), rgba(78, 205, 196, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.stat-row {
    display: grid;
    grid-template-columns: 80px 1fr 100px 30px;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.stat-row.correct-answer {
    background: rgba(78, 205, 196, 0.15);
    border: 1px solid rgba(78, 205, 196, 0.4);
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    color: #fff;
}

.stat-row.correct-answer .option-letter {
    background: linear-gradient(135deg, #4ecdc4, #45b3aa);
}

.option-text {
    font-size: 0.9rem;
    color: #ccc;
}

.stat-bar-wrapper {
    width: 100%;
    height: 30px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.stat-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ff5252);
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
}

.stat-row.correct-answer .stat-bar {
    background: linear-gradient(90deg, #4ecdc4, #45b3aa);
}

.stat-count {
    display: flex;
    flex-direction: column;
    text-align: right;
    color: #fff;
}

.count-number {
    font-weight: bold;
    font-size: 1.1rem;
}

.count-percent {
    font-size: 0.85rem;
    color: #aaa;
}

.stat-correct {
    font-size: 1.2rem;
    text-align: center;
}

/* ✅ NOVO: Estilos para Feedback da Resposta Correta */
.correct-answer-display {
    padding: 16px;
    background: rgba(78, 205, 196, 0.15);
    border: 2px solid #4ecdc4;
    border-radius: 12px;
    text-align: center;
    animation: slideInUp 0.4s ease;
}

.check-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    animation: bounce 0.6s ease;
}

.correct-text {
    font-size: 1.1rem;
    color: #4ecdc4;
    font-weight: 600;
    margin-bottom: 12px;
}

.correct-answer-detail {
    font-size: 0.95rem;
    color: #ccc;
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(78, 205, 196, 0.1);
    border-radius: 8px;
}

.explanation {
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.5;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(78, 205, 196, 0.3);
}

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

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

/* ✅ NOVO: Estilos para Feedback do Player */
.answer-feedback {
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 100%;
    box-sizing: border-box;
}

.answer-feedback.correct {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.95), rgba(76, 175, 80, 0.95));
    border: 2px solid #4ecdc4;
    color: #fff;
}

.answer-feedback.incorrect {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.95), rgba(244, 67, 54, 0.95));
    border: 2px solid #ff6b6b;
    color: #fff;
}

.feedback-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    display: block;
}

.feedback-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 12px;
}

.feedback-points {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.feedback-explanation {
    margin: 16px 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
}

.feedback-hint {
    margin-top: 16px;
    font-size: 0.9rem;
    opacity: 0.9;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    70% {
        transform: scale(1.05) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* ✅ NOVO: Melhorias gerais */
.answer-chart {
    min-height: 150px;
}

