/* Splash Mode Specific Styles */

/* Splash Game Panel */
.splash-game-panel {
    background: var(--panel-bg);
    border-radius: 16px;
    border: 1px solid var(--panel-border);
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.splash-title {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 25px;
}

/* Splash Image Container */
.splash-image-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.splash-image-container {
    width: 350px;
    height: 200px;
    border-radius: 12px;
    border: 3px solid var(--panel-border);
    overflow: hidden;
    position: relative;
    background: #0a0a0a;
    cursor: crosshair;
}

.splash-image-container canvas.canvas-crop {
    width: 100%;
    height: 100%;
    display: block;
    user-select: none;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Hint Section */
.hint-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.hint-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #ffffff;
}

.hint-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(230, 126, 34, 0.5);
}

.hint-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.hint-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
}

/* Search Container for Splash Mode */
.splash-search {
    position: relative;
    max-width: 500px;
    margin: 0 auto 25px;
    display: flex;
    gap: 0;
}

.splash-search .search-input {
    border-radius: 12px 0 0 12px;
    padding-right: 20px;
}

.search-submit {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--primary-gold-dark) 100%);
    border: none;
    border-radius: 0 12px 12px 0;
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    transition: all 0.3s ease;
}

.search-submit:hover {
    background: linear-gradient(135deg, var(--primary-gold-dark) 0%, #7a6429 100%);
}

.search-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Guess List - Card Format */
.guess-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.guess-card {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    position: relative;
    animation: cardAppear 0.3s ease;
}

.guess-card.wrong {
    background: linear-gradient(135deg, #c94a4a 0%, #a83a3a 100%);
}

.guess-card.correct {
    background: linear-gradient(135deg, #4a9d4a 0%, #3a8a3a 100%);
    border: 2px solid #5ab55a;
}

.guess-card .champion-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    margin-right: 15px;
    object-fit: cover;
}

.guess-card .champion-name {
    flex: 1;
    text-align: center;
    color: white;
    font-weight: 500;
    font-size: 1rem;
}

.guess-card .guess-count {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

.guess-card .guess-count svg {
    opacity: 0.8;
}

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

/* Victory Panel */
.victory-panel {
    display: none;
    background: linear-gradient(135deg, #1a5a3a 0%, #0d3d28 100%);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 2px solid #2a7a4a;
    margin-top: 20px;
    animation: victoryAppear 0.5s ease;
}

.victory-panel.active {
    display: block;
}

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

.gg-text {
    font-size: 36px;
    color: #88ddaa;
    margin-bottom: 20px;
    font-style: italic;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(136, 221, 170, 0.3);
}

.champion-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.champion-result .champion-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid #4a9d4a;
    object-fit: cover;
}

.result-text {
    text-align: left;
}

.result-text .label {
    display: block;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 4px;
}

.result-text .champion-name {
    font-size: 24px;
    color: white;
    font-weight: bold;
}

.rank-text {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 5px;
}

.rank-text .rank {
    color: #66cccc;
    font-weight: 600;
}

.tries-text {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 15px;
}

.tries-count {
    color: #66cccc;
    font-weight: bold;
    font-size: 16px;
}

.stats-btn {
    background: rgba(0,0,0,0.3);
    border: 1px solid #555;
    color: white;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin: 15px 0;
    transition: all 0.3s ease;
    font-size: 14px;
}

.stats-btn:hover {
    background: rgba(0,0,0,0.5);
    border-color: #777;
}

.full-splash {
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid #444;
}

.full-splash img {
    width: 100%;
    display: block;
}

/* Bonus Question Section */
.bonus-question {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.bonus-label {
    font-size: 10px;
    color: #888;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.bonus-question h3 {
    color: white;
    margin: 10px 0 15px;
    font-size: 18px;
}

.bonus-question input {
    width: 70%;
    max-width: 300px;
    padding: 12px 15px;
    border-radius: 5px;
    border: 1px solid #555;
    background: rgba(0,0,0,0.5);
    color: white;
    margin-bottom: 10px;
    font-size: 14px;
}

.bonus-question input:focus {
    outline: none;
    border-color: var(--primary-gold);
}

.bonus-question input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.guess-btn {
    background: #555;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.guess-btn:hover {
    background: #666;
}

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

.bonus-result {
    margin-top: 10px;
    display: none;
}

.bonus-result.active {
    display: block;
}

.bonus-correct {
    color: #4caf50;
    font-weight: 600;
}

.bonus-wrong {
    color: #f44336;
    font-weight: 600;
}

/* Next Champion Countdown */
.next-champion {
    margin: 25px 0;
    padding: 15px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.next-champion p {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 5px;
}

.countdown {
    font-size: 32px;
    color: white;
    margin: 10px 0;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.timezone {
    font-size: 11px;
    color: #888;
}

/* Share Section */
.share-section {
    background: rgba(30, 80, 120, 0.8);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.share-text {
    color: white;
    margin-bottom: 5px;
    font-size: 14px;
    line-height: 1.4;
}

.share-url {
    color: #aaa;
    font-size: 12px;
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.copy-btn, .twitter-btn {
    padding: 12px 25px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.copy-btn {
    background: #555;
    color: white;
}

.copy-btn:hover {
    background: #666;
}

.twitter-btn {
    background: #1da1f2;
    color: white;
}

.twitter-btn:hover {
    background: #0d8ecf;
}

/* Stats Section */
.splash-stats-section {
    background: var(--panel-bg);
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
}

.splash-stat-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.splash-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-gold);
}

.splash-stat-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Zoom indicator */
.zoom-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--primary-gold);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Image loading state */
.splash-image-container.loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.splash-image-container.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--panel-border);
    border-top-color: var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.splash-image-container.loading canvas.canvas-crop {
    display: none;
}

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

/* Fully revealed state */
.splash-image-container.revealed {
    border-color: var(--cell-green);
    width: 100%;
    max-width: 600px;
    height: auto;
    aspect-ratio: 1215 / 717;
}

.splash-image-container.revealed canvas.canvas-crop {
    width: 100%;
    height: 100%;
}

/* Yesterday Section */
.yesterday-section {
    background: var(--panel-bg);
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
}

.yesterday-section h3 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.yesterday-champion {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.yesterday-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-gold);
}

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

.yesterday-name {
    color: var(--text-primary);
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .splash-game-panel {
        padding: 20px;
    }

    .splash-title {
        font-size: 1.1rem;
    }

    .splash-image-container {
        width: 300px;
        height: 170px;
    }

    .splash-search {
        max-width: 100%;
    }

    .guess-card {
        padding: 10px 12px;
    }

    .guess-card .champion-icon {
        width: 35px;
        height: 35px;
        margin-right: 10px;
    }

    .guess-card .champion-name {
        font-size: 0.9rem;
    }

    .gg-text {
        font-size: 28px;
    }

    .champion-result .champion-icon {
        width: 50px;
        height: 50px;
    }

    .result-text .champion-name {
        font-size: 20px;
    }

    .countdown {
        font-size: 26px;
    }

    .bonus-question input {
        width: 60%;
    }

    .guess-btn {
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .splash-image-container {
        width: 100%;
        height: 150px;
    }

    .hint-btn {
        width: 45px;
        height: 45px;
    }

    .guess-card {
        padding: 8px 10px;
    }

    .guess-card .champion-icon {
        width: 30px;
        height: 30px;
        margin-right: 8px;
    }

    .guess-card .champion-name {
        font-size: 0.85rem;
    }

    .guess-card .guess-count {
        font-size: 10px;
    }

    .victory-panel {
        padding: 15px;
    }

    .gg-text {
        font-size: 24px;
    }

    .champion-result {
        flex-direction: column;
        gap: 10px;
    }

    .result-text {
        text-align: center;
    }

    .result-text .champion-name {
        font-size: 18px;
    }

    .bonus-question {
        padding: 15px;
    }

    .bonus-question input {
        width: 100%;
        margin-bottom: 10px;
    }

    .guess-btn {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }

    .share-buttons {
        flex-direction: column;
    }

    .copy-btn, .twitter-btn {
        width: 100%;
    }
}

/* Endless Mode Overrides for Splash Page */
.splash-game-panel .mode-toggles {
    max-width: 450px;
    margin: 0 auto 25px auto;
}

.splash-game-panel .endless-stats-bar {
    max-width: 500px;
    margin: 0 auto 25px auto;
    background: linear-gradient(145deg, rgba(35, 45, 60, 0.95) 0%, rgba(25, 35, 50, 0.98) 100%);
    border: 2px solid var(--panel-border);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.splash-game-panel .endless-stats-bar .endless-reset-btn {
    margin-left: 0;
    margin-top: 0;
}

/* Ensure layout stability when toggling modes */
.splash-game-panel .splash-image-wrapper {
    min-height: 200px;
}

.splash-game-panel .hint-section {
    min-height: 80px;
}

.splash-game-panel .search-container.splash-search {
    min-height: 60px;
}

/* Next button in endless mode for splash */
.splash-game-panel .next-btn {
    background: linear-gradient(145deg, var(--primary-gold) 0%, var(--primary-gold-dark) 100%);
    color: #1a1a1a;
    border: none;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.splash-game-panel .next-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(196, 168, 75, 0.5);
}

/* Disabled mode buttons */
.mode-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mode-btn:disabled:hover {
    transform: none;
    border-color: var(--panel-border);
}

/* Link mode buttons */
a.mode-btn {
    text-decoration: none;
}

/* Celebration animation for win */
@keyframes celebrate {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.victory-panel.active {
    animation: victoryAppear 0.5s ease, celebrate 2s ease-in-out infinite;
    animation-delay: 0s, 0.5s;
}
