/* Flappy Bird Game Styles */

.game-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

.game-canvas {
    border: 3px solid var(--border-color, #444);
    border-radius: 12px;
    background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

.game-canvas:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

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

.game-overlay-content {
    text-align: center;
    color: white;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 12px;
    border: 2px solid var(--accent-color, #4CAF50);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.game-overlay-content:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.game-overlay-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-color, #4CAF50);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.game-overlay-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #ccc;
    line-height: 1.4;
}

.game-ui {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--card-bg, #2a2a2a);
    border-radius: 8px;
    border: 1px solid var(--border-color, #444);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.game-ui:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.game-score {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color, #4CAF50);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.game-score.updated {
    animation: scoreUpdate 0.5s ease-out;
}

@keyframes scoreUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); color: #FFD700; }
    100% { transform: scale(1); }
}

.game-controls {
    display: flex;
    gap: 1rem;
}

.game-controls .btn {
    transition: all 0.2s ease;
}

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

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

.game-features {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.game-login-prompt {
    text-align: center;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--card-bg, #2a2a2a);
    border-radius: 8px;
    border: 1px solid var(--border-color, #444);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.game-login-prompt:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.game-login-prompt p {
    margin-bottom: 1rem;
    color: var(--text-secondary, #ccc);
}

.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-canvas {
        width: 100%;
        max-width: 400px;
        height: auto;
        border-width: 2px;
    }
    
    .game-ui {
        flex-direction: column;
        gap: 1rem;
        padding: 0.75rem;
    }
    
    .game-controls {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .game-controls .btn {
        min-height: 48px;
        font-size: 1rem;
        padding: 12px 16px;
    }
    
    .game-features {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .game-features .btn {
        min-height: 48px;
        font-size: 1rem;
        padding: 12px 16px;
        width: 100%;
        max-width: 200px;
    }
    
    .game-overlay-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .game-overlay-content h2 {
        font-size: 1.5rem;
    }
    
    .game-overlay-content p {
        font-size: 1rem;
    }
    
    /* Improve touch area for mobile */
    .touch-area {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 5;
        cursor: pointer;
    }
}

@media (max-width: 480px) {
    .game-canvas {
        max-width: 350px;
        border-width: 1px;
    }
    
    .game-ui {
        padding: 0.5rem;
        gap: 0.75rem;
    }
    
    .game-controls {
        gap: 0.25rem;
    }
    
    .game-controls .btn {
        min-height: 44px;
        font-size: 0.95rem;
        padding: 10px 14px;
    }
    
    .game-features .btn {
        min-height: 44px;
        font-size: 0.95rem;
        padding: 10px 14px;
    }
    
    .game-overlay-content {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .game-overlay-content h2 {
        font-size: 1.25rem;
    }
    
    .game-overlay-content p {
        font-size: 0.9rem;
    }
    
    .game-score {
        font-size: 1.25rem;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .game-canvas {
        max-width: 60vw;
        max-height: 70vh;
    }
    
    .game-ui {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .game-controls {
        flex-direction: row;
        gap: 0.25rem;
    }
    
    .game-controls .btn {
        min-height: 40px;
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    .game-features {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .game-features .btn {
        min-height: 40px;
        font-size: 0.9rem;
        padding: 8px 12px;
        max-width: 150px;
    }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
    .game-controls .btn,
    .game-features .btn {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    .game-controls .btn:hover,
    .game-features .btn:hover {
        transform: none;
    }
    
    .game-controls .btn:active,
    .game-features .btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Improve touch feedback */
    .touch-area:active {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Game-specific animations */
@keyframes flap {
    0% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
    100% { transform: rotate(-10deg); }
}

.flapping {
    animation: flap 0.2s ease-in-out;
}

/* Pipe animations */
@keyframes pipeMove {
    from { transform: translateX(100%); }
    to { transform: translateX(-100%); }
}

.pipe {
    animation: pipeMove 3s linear infinite;
}

/* Discord Share Modal Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes slideOut {
    from { 
        transform: translateX(0); 
        opacity: 1; 
    }
    to { 
        transform: translateX(100%); 
        opacity: 0; 
    }
}

/* Discord Share Button Styles */
.share-discord-btn {
    background: #5865F2 !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-weight: bold !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3) !important;
    margin-top: 15px !important;
    margin-bottom: 10px !important;
    position: relative !important;
    overflow: hidden !important;
}

.share-discord-btn::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent) !important;
    transition: left 0.5s !important;
}

.share-discord-btn:hover::before {
    left: 100% !important;
}

.share-discord-btn:hover {
    background: #4752C4 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(88, 101, 242, 0.4) !important;
}

.share-discord-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.3) !important;
}

/* Cooldown Animation */
.game-overlay-content p {
    transition: color 0.3s ease !important;
}

.game-overlay-content p.cooldown {
    color: #FFD700 !important;
    animation: pulse 1s ease-in-out infinite !important;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Share Message Animation */
.share-message {
    animation: slideIn 0.3s ease !important;
}

.share-message.slideOut {
    animation: slideOut 0.3s ease-in !important;
}

/* Score popup animation */
@keyframes scorePopup {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}

.score-popup {
    position: absolute;
    color: #FFD700;
    font-weight: bold;
    font-size: 1.2rem;
    animation: scorePopup 1s ease-out forwards;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Game over screen */
.game-over {
    background: rgba(255, 0, 0, 0.1);
    border-color: #ff4444;
}

.game-over .game-overlay-content h2 {
    color: #ff4444;
}

/* Pause overlay */
.paused .game-overlay-content h2 {
    color: #FFA500;
}

/* Loading state */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Success state */
.success {
    border-color: var(--accent-color, #4CAF50);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}

/* Smooth bird movement */
.bird-smooth {
    transition: all 0.1s ease-out;
}

/* Pipe collision warning */
.pipe-warning {
    animation: warningPulse 0.5s ease-in-out;
}

@keyframes warningPulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Achievement unlock animation */
@keyframes achievementUnlock {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(0deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.achievement-unlock {
    animation: achievementUnlock 0.8s ease-out forwards;
}

/* Game state transitions */
.game-transition {
    transition: all 0.3s ease-in-out;
}

/* Performance optimizations */
.game-canvas {
    will-change: transform;
    backface-visibility: hidden;
}

/* High DPI support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .game-canvas {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
} 