/* Variabel CSS */
:root {
    --zona-aman: #4CAF50;
    --zona-risiko: #FFC107;
    --zona-bahaya: #F44336;
    --biru-muda: #E3F2FD;
    --kuning-muda: #FFF9C4;
    --merah-muda: #FFEBEE;
    --biru-tua: #1565C0;
    --hijau-tua: #2E7D32;
    --ungu: #7B1FA2;
}

/* Reset dan dasar */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Nunito', sans-serif;
}

body {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    min-height: 100vh;
    padding: 10px;
    color: #333;
}

/* Kontainer aplikasi */
.app-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Layar */
.screen {
    display: none;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 90vh;
}

.active-screen {
    display: block;
}

/* Header */
.header {
    background: linear-gradient(90deg, #2196F3, #21CBF3);
    color: white;
    padding: 20px 15px;
    text-align: center;
    border-bottom: 5px solid #FFC107;
}

.header h1 {
    font-family: 'Comic Neue', cursive;
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    background-color: #ffffff;
    color: #000000;
    display: inline-block;
    margin: 0 5px 5px 0;
}

/* PERBAIKAN: Game links di header */
.game-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.game-link, .help-link {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.game-link i, .help-link i {
    margin-right: 8px;
}

.game-link:hover, .help-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Pilihan Tim */
.team-selection {
    padding: 20px 15px;
}

.team-selection h2 {
    color: var(--biru-tua);
    font-size: 1.5rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.team-selection h2 i {
    margin-right: 10px;
}

.subtitle {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Grid tim */
.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.team-option {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.team-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--biru-tua);
}

.team-option.selected {
    background: linear-gradient(135deg, #2196F3 0%, #21CBF3 100%);
    color: white;
    border-color: var(--biru-tua);
}

.team-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--biru-tua);
}

.team-option.selected .team-icon {
    color: white;
}

.team-name {
    font-weight: 600;
    font-size: 1rem;
    word-break: break-word;
}

/* Kelompok Kustom */
.custom-team {
    margin-bottom: 25px;
}

.custom-team h3 {
    color: var(--biru-tua);
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.custom-team h3 i {
    margin-right: 10px;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    font-family: 'Nunito', sans-serif;
}

.input-group input:focus {
    border-color: var(--biru-tua);
}

.btn-custom {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0 20px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-custom:hover {
    transform: scale(1.05);
}

/* Petunjuk */
.instructions {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 0 15px 20px;
}

.instructions h3 {
    color: var(--biru-tua);
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.instructions h3 i {
    margin-right: 10px;
}

.instructions ul {
    padding-left: 20px;
    color: #555;
    margin-bottom: 15px;
}

.instructions li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.quick-guide {
    margin-top: 15px;
    text-align: center;
}

.full-guide-link {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(90deg, #2196F3, #03A9F4);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.full-guide-link i {
    margin-right: 8px;
}

.full-guide-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

/* Info RTIK */
.rtik-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 15px;
    text-align: center;
}

.rtik-info h3 {
    color: var(--biru-tua);
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rtik-info h3 i {
    margin-right: 10px;
}

.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.social-link {
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.social-link i {
    margin-right: 8px;
}

.social-link.web {
    background: #2196F3;
    color: white;
}

.social-link.ig {
    background: #E4405F;
    color: white;
}

.social-link.fb {
    background: #1877F2;
    color: white;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Layar Game */
.team-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
}

.team-name-display {
    background: linear-gradient(90deg, #7B1FA2, #9C27B0);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    max-width: 100%;
    margin-bottom: 10px;
}

.team-name-display i {
    margin-right: 8px;
}

.game-info {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.info-box {
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 0.9rem;
    min-width: 70px;
    text-align: center;
}

.timer {
    background-color: #E3F2FD;
    color: #0d6efd;
}

.score {
    background-color: #FFF3CD;
    color: #664d03;
}

/* Kotak Pertanyaan */
.question-box-container {
    padding: 20px 15px;
}

.question-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #dee2e6;
}

.statement {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
}

/* Tombol Zona Horizontal */
.zona-container-horizontal {
    display: flex;
    padding: 15px;
    justify-content: space-between;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    gap: 10px;
}

.zona-horizontal {
    flex: 1;
    min-height: 90px;
    padding: 15px 5px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 3px solid transparent;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.zona-horizontal:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

.zona-aman {
    background-color: var(--biru-muda);
    border-color: var(--zona-aman);
}

.zona-risiko {
    background-color: var(--kuning-muda);
    border-color: var(--zona-risiko);
}

.zona-bahaya {
    background-color: var(--merah-muda);
    border-color: var(--zona-bahaya);
}

.zona-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.zona-title {
    font-size: 1rem;
    font-weight: 700;
}

.zona-aman .zona-title {
    color: var(--zona-aman);
}

.zona-risiko .zona-title {
    color: var(--zona-risiko);
}

.zona-bahaya .zona-title {
    color: var(--zona-bahaya);
}

/* Kontrol */
.controls {
    padding: 20px 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    background-color: #f8f9fa;
    gap: 10px;
}

.btn-game {
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    font-family: 'Nunito', sans-serif;
}

.btn-start {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    color: white;
}

.btn-next {
    background: linear-gradient(90deg, #2196F3, #03A9F4);
    color: white;
}

.btn-reset {
    background: linear-gradient(90deg, #FF9800, #FFB74D);
    color: white;
}

.btn-back {
    background: linear-gradient(90deg, #9C27B0, #BA68C8);
    color: white;
}

.btn-help {
    background: linear-gradient(90deg, #9C27B0, #BA68C8);
    color: white;
}

.btn-game:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-game:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Layar Hasil */
.result-content {
    padding: 20px 15px;
    text-align: center;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
}

.result-header {
    margin-bottom: 25px;
}

.result-header h1 {
    color: var(--biru-tua);
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-header h1 i {
    margin-right: 10px;
}

.team-result-name {
    background: linear-gradient(90deg, #7B1FA2, #9C27B0);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
}

.score-display {
    margin-bottom: 30px;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2196F3, #21CBF3);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 10px 20px rgba(33, 150, 243, 0.3);
}

.score-circle span {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.score-label {
    font-size: 1rem;
    opacity: 0.9;
}

.score-details {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.detail-item {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-item i {
    font-size: 1.2rem;
}

.detail-item:nth-child(1) i {
    color: #4CAF50;
}

.detail-item:nth-child(2) i {
    color: #F44336;
}

.detail-item:nth-child(3) i {
    color: #FF9800;
}

.result-message-box {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.result-message {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
}

.highlight-message {
    background-color: #FFF9C4;
    border-left: 4px solid #FFC107;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    color: #5D4037;
    font-weight: 600;
    gap: 10px;
}

.highlight-message i {
    color: #FF9800;
}

.result-controls {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    gap: 12px;
}

/* PERBAIKAN: Tombol Google Sheets (mengganti WhatsApp) */
.btn-sheets {
    background: linear-gradient(90deg, #34A853, #0F9D58);
    color: white;
}

.btn-sheets:hover {
    background: linear-gradient(90deg, #2E8B45, #0D874D);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(52, 168, 83, 0.3);
}

.btn-again {
    background: linear-gradient(90deg, #2196F3, #03A9F4);
    color: white;
}

.btn-back-to-teams {
    background: linear-gradient(90deg, #9C27B0, #BA68C8);
    color: white;
}

.btn-guide {
    background: linear-gradient(90deg, #607D8B, #78909C);
    color: white;
}

.result-footer {
    margin-top: auto;
    color: #666;
    font-size: 0.85rem;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.result-footer p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-footer p i {
    margin-right: 8px;
}

.rtik-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.rtik-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 50%;
    color: #666;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.rtik-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.rtik-links a:nth-child(1):hover {
    color: #2196F3;
}

.rtik-links a:nth-child(2):hover {
    color: #E4405F;
}

.rtik-links a:nth-child(3):hover {
    color: #1877F2;
}

.rtik-links a:nth-child(4):hover {
    color: #4CAF50;
}

/* Animasi */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.5s ease;
}

@keyframes correct {
    0% { background-color: #f8f9fa; }
    50% { background-color: rgba(76, 175, 80, 0.2); }
    100% { background-color: #f8f9fa; }
}

@keyframes incorrect {
    0% { background-color: #f8f9fa; }
    50% { background-color: rgba(244, 67, 54, 0.2); }
    100% { background-color: #f8f9fa; }
}

.correct-animation {
    animation: correct 1s ease;
}

.incorrect-animation {
    animation: incorrect 1s ease;
}

/* Help Button Floating */
.help-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(90deg, #FF9800, #FFB74D);
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    font-weight: 600;
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s;
    gap: 8px;
}

.help-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .statement {
        font-size: 1.2rem;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .zona-horizontal {
        min-height: 80px;
        padding: 10px 5px;
    }
    
    .zona-icon {
        font-size: 1.5rem;
    }
    
    .zona-title {
        font-size: 0.9rem;
    }
    
    .btn-game {
        min-width: 100px;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .score-circle {
        width: 130px;
        height: 130px;
    }
    
    .score-circle span {
        font-size: 2.5rem;
    }
    
    .help-button {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .team-info-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .team-name-display {
        margin-bottom: 10px;
        max-width: 100%;
    }
}

@media (min-width: 768px) {
    .app-container {
        max-width: 750px;
    }
    
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .zona-horizontal {
        min-height: 100px;
    }
}

@media (min-width: 1024px) {
    .app-container {
        max-width: 900px;
    }
}

/* Utility classes */
.me-2 {
    margin-right: 0.5rem !important;
}

.mt-2 {
    margin-top: 0.5rem;
}