/* Flappy Bird Game Styles */

#gameCanvas {
    display: block;
    margin: 0 auto;
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 100%);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    max-width: 100%;
    height: auto;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.overlay-content {
    padding: 2rem;
    animation: slideIn 0.5s ease-out;
    color: #ffffff;
}

.overlay-content p {
    color: #ffffff;
    font-size: 1.1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.overlay-content h2 {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.game-title-container {
    position: relative;
    display: inline-block;
}

.game-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: #FFD700;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow:
        0 0 10px rgba(255, 215, 0, 0.8),
        2px 2px 0 #FF8C00,
        4px 4px 0 #CC6600,
        6px 6px 8px rgba(0, 0, 0, 0.4);
    animation: titleFloat 3s ease-in-out infinite;
    margin-bottom: 0;
}

.game-title-reflection {
    font-size: 2.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #FFD700;
    transform: scaleY(-0.4) translateY(0);
    opacity: 0.25;
    filter: blur(1px);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 80%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 80%);
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    margin-top: -10px;
}

.game-over-stats {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.stat-item {
    margin: 0.5rem 0;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
}

.pulse-animation {
    animation: pulse 1.5s ease-in-out infinite;
}

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

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

@keyframes titleFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.02);
    }
}

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

/* Stats Cards */
.card {
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

/* Button Styles */
.btn-control {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.btn-control:active {
    transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-title {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    .game-title-reflection {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .overlay-content {
        padding: 1rem;
    }

    .overlay-content p {
        font-size: 1rem;
    }

    #gameCanvas {
        max-height: 70vh;
        object-fit: contain;
    }
}

@media (max-width: 400px) {
    .game-title {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    .game-title-reflection {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
}

/* Screen shake animation for game over */
@keyframes screenShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: screenShake 0.5s ease-in-out;
}

/* Alert Animations */
.alert {
    animation: fadeIn 0.5s ease-out;
}

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

/* Badge Animation */
.badge {
    display: inline-block;
}

.badge.pulse-animation {
    animation: pulse 1s ease-in-out infinite;
}

/* Card Header Icons */
.card-header i {
    color: var(--bs-primary);
}

/* Form Controls */
.form-select:focus,
.form-check-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* Tips List */
ul {
    padding-left: 1.5rem;
}

ul li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Dark Mode Support */
[data-bs-theme="dark"] #gameCanvas {
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .card {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .game-over-stats {
    background: rgba(255, 255, 255, 0.15);
}

/* Score Display */
#currentScore {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

#bestScore {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

#totalAttempts {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* Loading State */
.card-body.p-0 {
    overflow: hidden;
}

/* Instructions */
.alert-info {
    border-left: 4px solid var(--bs-info);
}

/* Hover Effects */
.btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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