/* Pyramid Game Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.card-header .subtitle {
    color: #666;
    font-size: 1.1rem;
}

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

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

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #F59E0B;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #34D399, #10B981);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
}

.btn-secondary {
    background: #6B7280;
    color: white;
}

.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 12px 20px;
    background: rgba(255,255,255,0.95);
    color: #F59E0B;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 2px solid #F59E0B;
    z-index: 1000;
    transition: all 0.3s;
}

.back-button:hover {
    background: #F59E0B;
    color: white;
    transform: translateY(-2px);
}

/* Category Card */
.category-card {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.category-name {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.item-box {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 3px solid transparent;
}

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

.item-box.guessed {
    background: #34D399;
    color: white;
    border-color: #10B981;
}

.item-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

.item-box.guessed .item-text {
    color: white;
}

/* Timer */
.timer {
    font-size: 4rem;
    font-weight: 900;
    text-align: center;
    margin: 20px 0;
    color: #F59E0B;
}

.timer.warning {
    color: #EF4444;
    animation: pulse 1s infinite;
}

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

/* Scoreboard */
.scoreboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.team-box {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.team-box.active {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    box-shadow: 0 0 0 4px #FCD34D;
}

.team-name {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 10px;
    font-weight: 600;
}

.team-score {
    font-size: 3rem;
    font-weight: 900;
    color: #F59E0B;
}

.team-box.active .team-score {
    color: white;
}

/* TV Display */
.tv-display {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
}

.tv-header {
    font-size: 2.2rem;
    color: white;
    margin-bottom: 15px;
    font-weight: 700;
}

.tv-timer {
    font-size: 8rem;
    font-weight: 900;
    color: white;
    margin: 20px 0;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.tv-timer.warning {
    color: #FEE2E2;
    animation: pulse 1s infinite;
}

.tv-scoreboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    width: 100%;
    max-width: 800px;
}

.tv-team-box {
    background: rgba(255,255,255,0.95);
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.tv-team-box.active {
    box-shadow: 0 0 0 3px #FCD34D;
}

.tv-team-name {
    font-size: 0.95rem;
    color: #F59E0B;
    margin-bottom: 8px;
    font-weight: 700;
}

.tv-team-score {
    font-size: 2.2rem;
    font-weight: 900;
    color: #D97706;
}

.session-code {
    font-size: 3rem;
    font-weight: 900;
    color: #F59E0B;
    text-align: center;
    margin: 20px 0;
    letter-spacing: 8px;
}

.wc-value-input {
    width: 60px;
    padding: 8px 5px;
    border: 2px solid #F59E0B;
    border-radius: 6px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #92400E;
}

.wc-value-input:focus {
    outline: none;
    border-color: #D97706;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

/* Winner's Circle Section Styling */
.wc-section-header {
    margin-bottom: 20px;
}

.wc-config-card {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border: 2px solid #FBBF24;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(251, 191, 36, 0.1);
}

.wc-setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.wc-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #92400E;
    font-size: 1rem;
}

.wc-label-icon {
    font-size: 1.3rem;
}

.wc-time-input {
    width: 80px;
    padding: 10px;
    border: 2px solid #F59E0B;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #92400E;
    background: white;
    transition: all 0.2s;
}

.wc-time-input:focus {
    outline: none;
    border-color: #D97706;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.2);
    transform: scale(1.05);
}

.wc-categories-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.wc-categories-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #FEF3C7;
}

.wc-pyramid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
    margin: 0 auto;
}

.wc-category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border: 2px solid #FCD34D;
    transition: all 0.2s;
    position: relative;
}

.wc-category-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(251, 191, 36, 0.2);
    border-color: #F59E0B;
}

/* Pyramid visual effect - progressively indent */
.wc-cat-1 { width: 100%; background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%); }
.wc-cat-2 { width: 95%; margin-left: 2.5%; background: linear-gradient(135deg, #FDE68A 0%, #FCD34D 100%); }
.wc-cat-3 { width: 90%; margin-left: 5%; background: linear-gradient(135deg, #FCD34D 0%, #FBBF24 100%); }
.wc-cat-4 { width: 85%; margin-left: 7.5%; background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%); }
.wc-cat-5 { width: 80%; margin-left: 10%; background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%); }
.wc-cat-6 { width: 75%; margin-left: 12.5%; background: linear-gradient(135deg, #D97706 0%, #B45309 100%); }

.wc-cat-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    font-weight: 900;
    color: #F59E0B;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.wc-cat-input {
    width: 70px;
    padding: 10px 8px;
    border: 2px solid white;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #92400E;
    background: white;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wc-cat-input:focus {
    outline: none;
    border-color: #F59E0B;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.3);
    transform: scale(1.1);
}

.wc-cat-label {
    font-size: 0.85rem;
    color: #92400E;
    font-weight: 600;
    opacity: 0.8;
}

.wc-total-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-top: 20px;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(217, 119, 6, 0.3);
    color: white;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .wc-pyramid {
        max-width: 100%;
    }
    
    .wc-cat-1, .wc-cat-2, .wc-cat-3, 
    .wc-cat-4, .wc-cat-5, .wc-cat-6 {
        width: 100% !important;
        margin-left: 0 !important;
    }
}

/* Point notification animation */
@keyframes pointPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

.info-text {
    text-align: center;
    color: #666;
    margin: 10px 0;
}

.loading {
    text-align: center;
    padding: 40px;
    color: white;
    font-size: 1.5rem;
}

.button-grid {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.button-grid-2 {
    grid-template-columns: 1fr 1fr;
}

/* Team Input Grid */
.team-inputs {
    display: grid;
    gap: 15px;
}

.team-count-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.team-count-btn {
    padding: 12px 24px;
    border: 2px solid #F59E0B;
    background: white;
    color: #F59E0B;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.team-count-btn.active {
    background: #F59E0B;
    color: white;
}

.team-count-btn:hover {
    transform: translateY(-2px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .category-name {
        font-size: 2rem;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .tv-timer {
        font-size: 6rem;
    }
    
    .tv-team-score {
        font-size: 3.5rem;
    }
    
    .session-code {
        font-size: 2rem;
        letter-spacing: 4px;
    }
}