/**
 * Stili Frontend - Admin e Giocatore (No Login)
 */

/* ========== LAYOUT BASE ========== */
.quiz-frontend-admin,
.quiz-frontend-player {
    min-height: 100vh;
    background: #1a237e; /* Blu scuro solido */
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
}

/* ========== FORM CREAZIONE/JOIN SESSIONE ========== */
.quiz-create-session,
.quiz-join-session {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top, 20px));
}

.create-session-container,
.join-session-container {
    background: transparent;
    padding: 40px 20px;
    border-radius: 0;
    box-shadow: none;
    max-width: 600px;
    width: 100%;
    color: white;
}

@media (min-width: 768px) {
    .create-session-container,
    .join-session-container {
        padding: 40px;
    }
}

.create-session-container h1,
.join-session-container h1 {
    color: white;
    text-align: center;
    margin-bottom: 10px;
    font-size: 32px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.subtitle {
    text-align: center;
    color: rgba(255,255,255,0.9);
    margin-bottom: 30px;
    font-size: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: white;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
    box-sizing: border-box;
    color: #2c3e50;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: white;
    background: white;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
}

.category-builder {
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 16px;
    padding: 20px;
    background: rgba(255,255,255,0.05);
}

.category-builder .form-helper {
    margin: -5px 0 15px;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
}

.category-builder-controls {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 12px;
    margin-bottom: 15px;
}

.category-builder-controls select,
.category-builder-controls input {
    margin: 0;
}

.btn-add-category {
    background: #00c853;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-add-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 200, 83, 0.35);
}

.selected-categories-list {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    padding: 15px;
    max-height: 280px;
    overflow-y: auto;
}

.selected-categories-list.empty {
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-style: italic;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(26,35,126,0.6);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 10px;
    gap: 12px;
}

.category-name {
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-actions input {
    width: 90px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
}

.remove-category-btn {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.4);
    color: white;
    border-radius: 50px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.category-builder-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    color: white;
    font-weight: 600;
}

.btn-reset-categories {
    background: transparent;
    border: none;
    color: #ffab40;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

@media (max-width: 640px) {
    .category-builder-controls {
        grid-template-columns: 1fr;
    }
    
    .category-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .category-actions input {
        width: 100%;
    }
    
    .category-actions .remove-category-btn {
        align-self: flex-end;
    }
}

.input-readonly {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-primary {
    background: #3949ab; /* Blu medio scuro */
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-primary:hover {
    background: #303f9f; /* Blu più scuro al hover */
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.btn-large {
    padding: 18px 30px;
    font-size: 18px;
}

/* ========== SCHERMATA LINK CONDIVISIONE ========== */
.quiz-share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top, 20px));
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.share-link-container {
    background: transparent;
    padding: 40px 20px;
    border-radius: 0;
    box-shadow: none;
    max-width: 700px;
    width: 100%;
    text-align: center;
    color: white;
}

@media (min-width: 768px) {
    .share-link-container {
        padding: 40px;
    }
}

.share-link-container h2 {
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.share-url-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
    width: 100%;
    box-sizing: border-box;
}

.share-url-box input {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    font-size: 14px;
    color: #2c3e50;
    box-sizing: border-box;
}

.share-url-box input:focus {
    outline: none;
    border-color: white;
    background: white;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
}

.share-buttons-wrapper {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-shrink: 0;
    width: 100%;
}

.share-buttons-wrapper .btn-copy,
.share-buttons-wrapper .btn-whatsapp {
    flex: 1;
}

.btn-copy {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.btn-whatsapp:hover {
    background: #20ba5a;
}

.session-code-large {
    font-size: 48px;
    font-weight: bold;
    color: white;
    background: rgba(255,255,255,0.2);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    letter-spacing: 5px;
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
}

/* ========== DASHBOARD ADMIN ========== */
.quiz-admin-dashboard {
    background: transparent;
    border-radius: 0;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top, 20px));
    max-width: 1400px;
    margin: 0 auto;
    box-shadow: none;
    color: white;
}

@media (min-width: 768px) {
    .quiz-admin-dashboard {
        padding: 30px;
        padding-top: 30px;
    }
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid rgba(255,255,255,0.3);
    flex-wrap: wrap;
    gap: 15px;
}

.admin-header h2 {
    color: white;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-how-it-works {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-how-it-works:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-how-it-works:active {
    transform: translateY(0);
}

.admin-badge {
    background: #e74c3c; /* Rosso solido */
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

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

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
}

.game-controls {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.btn-control {
    flex: 1;
    min-width: 150px;
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-start {
    background: #27ae60;
    color: white;
}

.btn-pause {
    background: #f39c12;
    color: white;
}

.btn-next {
    background: #3498db;
    color: white;
}

.btn-end {
    background: #e74c3c;
    color: white;
}

.btn-control:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.current-question-section {
    background: #f8f9ff;
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
}

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

.question-category {
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
}

.answers-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.answer-option-admin {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 3px solid #ecf0f1;
    position: relative;
}

.answer-option-admin.correct {
    border-color: #27ae60;
    background: #d5f4e6;
}

.answer-label {
    display: inline-block;
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    margin-right: 10px;
}

.answer-text {
    font-weight: bold;
    margin: 10px 0;
    color: #000000 !important;
}

/* Assicura che il testo delle risposte nella dashboard admin sia sempre nero */
.answer-option-admin .answer-text,
.answers-admin-grid .answer-text,
#answer-text-a-admin,
#answer-text-b-admin,
#answer-text-c-admin,
#answer-text-d-admin {
    color: #000000 !important;
}

.answer-count {
    font-size: 12px;
    color: #000000 !important;
    font-weight: 600;
    text-shadow: none;
}

/* ========== INTERFACCIA GIOCATORE ========== */
.quiz-game-screen {
    background: transparent;
    border-radius: 0;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top, 20px));
    max-width: 100%;
    margin: 0;
    box-shadow: none;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .quiz-game-screen {
        max-width: 900px;
        margin: 0 auto;
        padding: 30px;
        padding-top: 30px;
    }
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid rgba(255,255,255,0.2);
}

.player-name {
    font-size: 18px;
    font-weight: bold;
    color: white;
}

.player-label {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    margin-top: 5px;
}

.player-score {
    font-size: 28px;
    font-weight: bold;
    color: white;
}

.timer-display {
    background: #f39c12; /* Arancione solido */
    color: white;
    padding: 15px 25px;
    border-radius: 50%;
    font-size: 32px;
    font-weight: bold;
    min-width: 70px;
    text-align: center;
}

.timer-display.warning {
    background: #e74c3c; /* Rosso solido */
    animation: pulse 1s infinite;
}

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

.question-section {
    margin: 25px 0;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.2);
}

.question-badge {
    display: inline-block;
    background: rgba(255,255,255,0.25);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 15px;
    border: 1px solid rgba(255,255,255,0.3);
}

.question-text {
    font-size: 22px;
    font-weight: bold;
    color: white;
    line-height: 1.6;
    margin: 15px 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.answers-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.answer-btn {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    background: rgba(255,255,255,0.95);
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    font-size: 16px;
    min-height: 60px;
    color: #2c3e50;
}

.answer-btn:hover:not(:disabled) {
    border-color: white;
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.answer-btn:disabled {
    cursor: not-allowed;
}

.answer-btn.selected {
    background: #667eea;
    color: white;
    border-color: #5568d3;
    opacity: 1;
}

.answer-btn.correct {
    background: #27ae60;
    color: white;
    border-color: #229954;
    opacity: 1;
}

.answer-btn.incorrect {
    background: #ff9800;
    color: white;
    border-color: #f57c00;
    opacity: 1;
}

.leaderboard-section,
.prizes-section {
    margin: 30px 0;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.2);
    color: white;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    margin: 8px 0;
    color: #2c3e50;
}

.leaderboard-item.self {
    background: rgba(255,255,255,0.95);
    color: #2c3e50;
    font-weight: bold;
    border: 2px solid white;
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.prize-card {
    padding: 15px;
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
    text-align: center;
    border: 3px solid rgba(255,255,255,0.3);
    color: #2c3e50;
}

.prize-card.qualified {
    border-color: #f1c40f;
    border-width: 4px;
    background: rgba(241, 196, 15, 0.2);
    backdrop-filter: blur(5px);
}

/* ========== RISULTATI FINALI ========== */
.quiz-final-results {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top, 20px));
}

.final-results-container {
    background: transparent;
    padding: 40px 20px;
    border-radius: 0;
    box-shadow: none;
    max-width: 800px;
    width: 100%;
    text-align: center;
    color: white;
}

@media (min-width: 768px) {
    .final-results-container {
        padding: 40px;
    }
}

.final-score-value {
    font-size: 56px;
    font-weight: bold;
    color: #764ba2;
    margin: 20px 0;
}

.final-leaderboard-box,
.final-prizes-box {
    margin: 30px 0;
    text-align: left;
}

/* ========== SChermata ATTESA ========== */
.quiz-waiting {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top, 20px));
}

.waiting-container {
    background: transparent;
    padding: 40px 20px;
    border-radius: 0;
    box-shadow: none;
    text-align: center;
    max-width: 500px;
    color: white;
}

@media (min-width: 768px) {
    .waiting-container {
        padding: 50px;
    }
}

.waiting-container h2 {
    color: white;
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.waiting-container p {
    color: white;
    font-size: 18px;
    margin: 15px 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.waiting-container strong {
    color: white;
    font-weight: bold;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.waiting-message {
    color: rgba(255,255,255,0.95);
    font-style: italic;
    font-size: 16px;
}

.waiting-icon {
    font-size: 64px;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.players-waiting {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid rgba(255,255,255,0.3);
}

.players-waiting p {
    color: white;
    font-weight: 500;
}

.players-waiting span {
    color: white;
    font-weight: bold;
    font-size: 20px;
}

/* Giocatori Admin */
.players-section {
    margin: 30px 0;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.2);
    color: white;
}

.player-card-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    margin: 10px 0;
    border-left: 5px solid rgba(255,255,255,0.3);
    color: #2c3e50;
}

.player-card-admin.correct {
    border-left-color: #27ae60;
    background: #d5f4e6;
}

.player-card-admin.incorrect {
    border-left-color: #e74c3c;
    background: #ffe0e0;
}

.player-card-admin.waiting {
    border-left-color: #95a5a6;
    background: #ecf0f1;
}

/* Premi Admin */
.prizes-section-admin {
    margin: 30px 0;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.2);
    color: white;
}

#prizes-grid-admin {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.prize-card-admin {
    padding: 20px;
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
    border: 3px solid rgba(255,255,255,0.3);
    text-align: center;
    color: #2c3e50;
}

.prize-card-admin h4 {
    margin: 10px 0;
    color: #2c3e50;
}

.prize-card-admin .prize-threshold {
    font-weight: bold;
    color: #667eea;
    font-size: 18px;
}

.prize-card-admin .assign-prize-btn {
    margin-top: 15px;
    width: 100%;
}

.prize-card-admin {
    position: relative;
}

.prize-card-admin .prize-threshold {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Statistiche timer */
.timer-value {
    font-size: 28px;
    color: #667eea;
}

/* Admin dashboard miglioramenti */
.quiz-admin-dashboard h3 {
    color: #667eea;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

/* Player cards admin */
.player-card-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    transition: all 0.3s;
}

.player-card-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Risultati Finali Admin */
.quiz-final-results-admin {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top, 20px));
    background: #1a237e; /* Blu scuro solido */
}

.final-results-container {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-width: 900px;
    width: 100%;
    text-align: center;
    color: #2c3e50;
}

.final-results-container h1 {
    color: #1a237e; /* Blu scuro per titolo */
    font-size: 48px;
    margin-bottom: 10px;
    text-shadow: none;
}

.final-results-container .subtitle {
    color: #7f8c8d;
    font-size: 18px;
    margin-bottom: 40px;
}

.final-leaderboard-admin {
    margin: 40px 0;
    text-align: left;
    background: #f8f9ff;
    padding: 30px;
    border-radius: 15px;
    max-height: 600px;
    overflow-y: auto;
}

.leaderboard-item-admin {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
    margin: 12px 0;
    border-left: 5px solid rgba(255,255,255,0.3);
    transition: all 0.3s;
    color: #2c3e50;
}

.leaderboard-item-admin:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.leaderboard-item-admin.podium {
    border-left-color: #f39c12;
    background: #fff9e6;
}

.leaderboard-item-admin.podium:first-child {
    border-left-color: #f1c40f;
    background: #fff9e6;
    box-shadow: 0 5px 15px rgba(241, 196, 15, 0.3);
}

.leaderboard-position {
    font-size: 24px;
    font-weight: bold;
    margin-right: 20px;
    min-width: 50px;
}

.leaderboard-name {
    flex: 1;
    font-size: 18px;
    font-weight: 500;
    color: #2c3e50;
}

.leaderboard-score {
    font-size: 22px;
    font-weight: bold;
    color: #3949ab;
    min-width: 100px;
    text-align: right;
}

.assigned-prizes-section {
    margin: 40px 0;
    padding: 30px;
    background: #f8f9ff;
    border-radius: 15px;
    border: 2px solid #e0e7ff;
}

.assigned-prizes-section h3 {
    color: #1a237e;
    margin-bottom: 20px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
}

#admin-assigned-prizes-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.assigned-prize-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e0e7ff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 15px;
}

.assigned-prize-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e7ff;
}

.prize-emoji {
    font-size: 48px;
}

.prize-info h4 {
    margin: 0 0 5px 0;
    color: #1a237e;
    font-size: 20px;
    font-weight: bold;
}

.prize-threshold {
    margin: 0;
    color: #3949ab;
    font-weight: bold;
    font-size: 14px;
}

.prize-description {
    margin: 5px 0 0 0;
    color: #7f8c8d;
    font-size: 14px;
}

.assigned-players-list {
    margin-top: 15px;
}

.players-count {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 16px;
}

.assigned-player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    margin: 8px 0;
    border: 1px solid #e0e7ff;
}

.assigned-player-item .player-name {
    font-weight: 500;
    color: #2c3e50;
    font-size: 16px;
}

.assigned-player-item .player-score {
    font-weight: bold;
    color: #3949ab;
    margin-right: 10px;
    font-size: 16px;
}

.btn-small,
.btn-reactivate,
.reactivate-prize-btn {
    background: #3949ab;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-small:hover,
.btn-reactivate:hover,
.reactivate-prize-btn:hover {
    background: #303f9f;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Assicura che il contenitore dei risultati finali abbia testo leggibile su sfondo bianco */
.final-results-container {
    color: #2c3e50;
}

.final-results-container p,
.final-results-container span,
.final-results-container div,
.final-results-container strong {
    color: #2c3e50;
}

.final-results-container .assigned-prizes-section,
.final-results-container .final-leaderboard-admin {
    color: #2c3e50;
}

.final-results-container .assigned-prize-card,
.final-results-container .leaderboard-item-admin {
    color: #2c3e50;
}

.final-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
}

.final-actions button {
    flex: 1;
    min-width: 200px;
}

#announce-winners-btn {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

#announce-winners-btn:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.6);
}


/* Video */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    margin: 20px 0;
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Modal Pausa */
.quiz-pause-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.pause-modal-content {
    background: white;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    max-width: 400px;
    animation: fadeIn 0.3s;
}

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

.pause-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.pause-modal-content h2 {
    color: #667eea;
    margin-bottom: 15px;
}

.pause-message {
    color: #7f8c8d;
    font-style: italic;
    margin-top: 20px;
}

/* Responsive - Mobile Fullscreen */
@media (max-width: 768px) {
    /* Rimuovi padding e margini extra su mobile */
    .quiz-frontend-admin,
    .quiz-frontend-player {
        padding: 0;
        min-height: 100vh;
        height: 100vh;
        overflow-x: hidden;
    }
    
    /* Schermate fullscreen su mobile con padding top per evitare taglio */
    .quiz-create-session,
    .quiz-join-session,
    .quiz-share-link,
    .quiz-waiting,
    .quiz-final-results,
    .quiz-final-results-admin {
        padding: 0;
        padding-top: 0;
        min-height: 100vh;
        height: 100vh;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }
    
    /* Container senza padding extra */
    .create-session-container,
    .join-session-container,
    .share-link-container,
    .waiting-container,
    .final-results-container {
        padding: max(20px, env(safe-area-inset-top, 20px)) 15px max(30px, env(safe-area-inset-bottom, 30px)) 15px !important;
        min-height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow-y: auto;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .share-link-container {
        padding: 15px !important;
    }
    
    /* Dashboard admin su mobile */
    .quiz-admin-dashboard {
        padding: 15px;
        padding-top: max(60px, env(safe-area-inset-top, 60px));
        min-height: 100vh;
        box-sizing: border-box;
    }
    
    /* Game screen su mobile */
    .quiz-game-screen {
        padding: 15px;
        padding-top: max(60px, env(safe-area-inset-top, 60px));
        min-height: 100vh;
        box-sizing: border-box;
    }
    
    /* Form responsive */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .answers-admin-grid {
        grid-template-columns: 1fr;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-control {
        width: 100%;
    }
    
    /* Titoli più piccoli su mobile */
    .create-session-container h1,
    .join-session-container h1 {
        font-size: 24px;
        margin-top: 0;
    }
    
    /* Form su mobile - assicura visibilità completa */
    .create-session-container form,
    .join-session-container form {
        margin-bottom: 20px;
    }
    
    /* Pulsante form su mobile */
    .create-session-container .btn-primary,
    .join-session-container .btn-primary {
        margin-top: 10px;
        margin-bottom: 10px;
    }
    
    .question-text {
        font-size: 18px;
    }
    
    /* Timer più piccolo su mobile */
    .timer-display {
        font-size: 24px;
        padding: 12px 20px;
        min-width: 60px;
    }
    
    /* Header più compatto */
    .player-header {
        padding: 12px 15px;
        margin-bottom: 15px;
    }
    
    .player-score {
        font-size: 24px;
    }
    
    /* Sezioni più compatte */
    .question-section {
        margin: 15px 0;
        padding: 15px;
    }
    
    .answers-section {
        gap: 12px;
        margin: 20px 0;
    }
    
    .answer-btn {
        padding: 15px 18px;
        min-height: 55px;
        font-size: 15px;
    }
    
    /* Leaderboard e premi più compatti */
    .leaderboard-section,
    .prizes-section {
        margin: 20px 0;
        padding: 15px;
    }
    
    /* Share URL box responsive */
    .share-url-box {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
    }
    
    .share-url-box input {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        box-sizing: border-box !important;
        min-width: 0 !important;
        padding: 12px !important;
        font-size: 14px !important;
    }
    
    .share-buttons-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .share-buttons-wrapper .btn-copy,
    .share-buttons-wrapper .btn-whatsapp {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 15px !important;
        font-size: 13px !important;
        white-space: normal !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        overflow: hidden !important;
        flex: none !important;
    }
    
    .session-code-large {
        font-size: 36px;
    }
    
    .share-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .share-actions button {
        width: 100%;
    }
}

/* Supporto per safe-area su iOS */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .quiz-create-session,
        .quiz-join-session,
        .quiz-share-link,
        .quiz-waiting,
        .quiz-game-screen {
            padding-left: max(15px, env(safe-area-inset-left));
            padding-right: max(15px, env(safe-area-inset-right));
            padding-top: max(15px, env(safe-area-inset-top));
            padding-bottom: max(15px, env(safe-area-inset-bottom));
        }
    }
}

/* ========== TUTORIAL INTERATTIVO ADMIN ========== */
.admin-tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tutorial-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.tutorial-content {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: tutorialSlideIn 0.3s ease-out;
}

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

.tutorial-header {
    padding: 25px 25px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tutorial-header h2 {
    color: white;
    margin: 0;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

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

.tutorial-body {
    padding: 40px 30px;
    text-align: center;
}

.tutorial-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: tutorialBounce 2s infinite;
}

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

.tutorial-body p {
    color: white;
    font-size: 22px;
    line-height: 1.8;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    padding: 0 10px;
}

.tutorial-highlight-box {
    position: absolute;
    border: 4px solid #ffd700;
    border-radius: 8px;
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.5);
    z-index: 9999;
    animation: tutorialPulse 1.5s infinite;
}

@keyframes tutorialPulse {
    0%, 100% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 215, 0, 0.8);
    }
}

.tutorial-highlight {
    position: relative;
    z-index: 10001 !important;
    animation: tutorialHighlight 1.5s infinite;
}

@keyframes tutorialHighlight {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }
}

.tutorial-footer {
    padding: 20px 25px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.tutorial-progress {
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.tutorial-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-tutorial {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-tutorial:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-skip {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-skip:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-prev {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-prev:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-next {
    background: white;
    color: #667eea;
}

.btn-next:hover {
    background: #f0f0f0;
}

@media (max-width: 768px) {
    .tutorial-content {
        max-width: 100%;
        border-radius: 15px;
    }
    
    .tutorial-header h2 {
        font-size: 24px;
    }
    
    .tutorial-body {
        padding: 30px 20px;
    }
    
    .tutorial-body p {
        font-size: 18px;
    }
    
    .tutorial-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tutorial-buttons {
        justify-content: stretch;
    }
    
    .btn-tutorial {
        flex: 1;
    }
}

/* ========== MODAL GESTIONE PREMI ========== */
.prizes-management-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.prizes-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.prizes-modal-content {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

.prizes-modal-header {
    padding: 25px 25px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 1;
}

.prizes-modal-header h2 {
    color: white;
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

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

.prizes-modal-body {
    padding: 25px;
    color: white;
}

.prizes-description {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.prizes-actions-bar {
    margin-bottom: 20px;
}

.btn-add-prize {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-add-prize:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.session-prizes-list {
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}

.session-prize-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
}

.session-prize-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.prize-item-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.prize-item-icon {
    font-size: 36px;
    min-width: 40px;
    text-align: center;
}

.prize-item-info {
    flex: 1;
}

.prize-item-name {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.prize-item-threshold {
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
}

.prize-item-desc {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 5px;
}

.prize-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-edit-prize,
.btn-remove-prize {
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-edit-prize {
    background: #3498db;
}

.btn-edit-prize:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.btn-remove-prize {
    background: #e74c3c;
}

.btn-remove-prize:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.prizes-modal-footer {
    padding: 20px 25px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-send-prizes {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.btn-send-prizes:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.6);
    background: #229954;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.share-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .prizes-modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .prizes-modal-header h2 {
        font-size: 20px;
    }
    
    .prizes-modal-body {
        padding: 20px;
    }
    
    .share-actions {
        flex-direction: column;
    }
    
    .share-actions button {
        width: 100%;
    }
    
    .prizes-modal-footer {
        flex-direction: column;
    }
    
    .prizes-modal-footer button {
        width: 100%;
    }
}

/* ========== NOTIFICHE PREMI ========== */
.prize-notification-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10003;
}

.prize-notification-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 10004;
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

.prize-notification-modal-content.success {
    border-top: 4px solid #27ae60;
}

.prize-notification-modal-content.warning {
    border-top: 4px solid #f39c12;
}

.prize-notification-body {
    padding: 25px;
    text-align: center;
}

.prize-notification-body p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
}

.prize-notification-footer {
    padding: 15px 25px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.prize-notification-close {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.prize-notification-close:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* ========== MODAL MODIFICA PREMIO ========== */
.prize-edit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 10001;
}

.prize-edit-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 10002;
    animation: slideUp 0.3s ease-out;
}

.prize-edit-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px 15px 0 0;
}

.prize-edit-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 20px;
    font-weight: bold;
}

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

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

.prize-edit-modal-body {
    padding: 25px;
}

.prize-edit-modal-body .form-group {
    margin-bottom: 20px;
}

.prize-edit-modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.prize-edit-modal-body input[type="text"],
.prize-edit-modal-body input[type="number"],
.prize-edit-modal-body textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.prize-edit-modal-body input[type="text"]:focus,
.prize-edit-modal-body input[type="number"]:focus,
.prize-edit-modal-body textarea:focus {
    outline: none;
    border-color: #667eea;
}

.prize-edit-modal-body textarea {
    resize: vertical;
    min-height: 80px;
}

.prize-edit-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.prize-edit-modal-footer .btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.prize-edit-modal-footer .btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.prize-edit-modal-footer .btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.prize-edit-modal-footer .btn-secondary:hover {
    background: #bdc3c7;
}

.btn-select-emoji {
    white-space: nowrap;
}

.btn-select-emoji:hover {
    background: #5568d3 !important;
    transform: translateY(-1px);
}

.emoji-option:hover {
    background: #667eea !important;
    border-color: #667eea !important;
    transform: scale(1.1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@media (max-width: 768px) {
    .prize-edit-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .prize-edit-modal-footer {
        flex-direction: column;
    }
    
    .prize-edit-modal-footer button {
        width: 100%;
    }
}

/* ========== CHAT ADMIN ========== */
.admin-chat-section {
    margin: 30px 0;
    padding: 25px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.2);
    color: white;
}

.admin-chat-section h3 {
    color: white;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.chat-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-form textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    color: #2c3e50;
    resize: vertical;
    min-height: 80px;
}

.chat-form textarea:focus {
    outline: none;
    border-color: white;
    background: white;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
}

.btn-chat-send {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    align-self: flex-start;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-chat-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

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

.chat-info {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    font-style: italic;
}

/* ========== MODAL MESSAGGIO ADMIN ========== */
.admin-message-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

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

.admin-message-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.admin-message-content {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

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

.admin-message-header {
    padding: 25px 25px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-message-icon {
    font-size: 48px;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

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

.admin-message-header h3 {
    color: white;
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.admin-message-body {
    padding: 30px 25px;
    text-align: center;
}

.admin-message-body p {
    color: white;
    font-size: 20px;
    line-height: 1.8;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.admin-message-footer {
    padding: 20px 25px 25px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-message-footer .btn-primary {
    background: white;
    color: #667eea;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.admin-message-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #f0f0f0;
}

@media (max-width: 768px) {
    .admin-message-content {
        max-width: 100%;
        border-radius: 15px;
    }
    
    .admin-message-header h3 {
        font-size: 20px;
    }
    
    .admin-message-body {
        padding: 25px 20px;
    }
    
    .admin-message-body p {
        font-size: 18px;
    }
    
    .chat-form {
        gap: 12px;
    }
    
    .btn-chat-send {
        width: 100%;
        align-self: stretch;
    }
}

