@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Press Start 2P', monospace;
    background: linear-gradient(135deg, #ff6b35, #f7931e, #ffd23f);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #2c1810;
}

.game-container {
    background: #8B4513;
    border: 8px solid #654321;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    max-width: 800px;
    width: 100%;
    margin: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 1.5rem;
    color: #ffd23f;
    text-shadow: 3px 3px 0px #8B4513;
    margin-bottom: 10px;
    line-height: 1.4;
}

.turtle-kebap {
    font-size: 3rem;
    animation: bounce 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.clickable-character {
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 0 5px;
}

.clickable-character:hover {
    transform: scale(1.2);
    filter: brightness(1.2);
}

.clickable-character:active {
    transform: scale(0.9);
}

/* Social Links Styles */
.social-link {
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 50%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #8B4513;
    animation: socialBounce 3s infinite;
}

.social-link:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    border-color: #ffd23f;
}

.social-link:active {
    transform: scale(0.9);
}

.social-icon {
    font-size: 3rem;
    display: block;
}

.telegram-link:hover .social-icon {
    animation: telegramPulse 0.5s infinite;
}

.lfg-link:hover .social-icon {
    animation: lfgSpin 0.8s infinite;
}

@keyframes socialBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

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

@keyframes lfgSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.audio-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.audio-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    padding: 8px 12px;
    background: #ff6b35;
    color: white;
    border: 2px solid #8B4513;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.audio-btn:hover {
    background: #f7931e;
    transform: scale(1.05);
}

.audio-btn.active {
    background: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.audio-btn.muted {
    background: #666;
    opacity: 0.6;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.score-board {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2c1810;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 3px solid #654321;
}

.current-score, .level, .lives, .high-score {
    color: #ffd23f;
    font-size: 0.8rem;
}

.level {
    color: #ff6b35;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.lives {
    color: #ff6b35;
    font-weight: bold;
}

.username-section {
    text-align: center;
    background: #654321;
    padding: 20px;
    border-radius: 10px;
    border: 3px solid #8B4513;
}

#usernameInput {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    padding: 10px;
    border: 3px solid #2c1810;
    border-radius: 5px;
    background: #ffd23f;
    color: #2c1810;
    margin-bottom: 15px;
    width: 100%;
    max-width: 300px;
}

#usernameInput::placeholder {
    color: #8B4513;
}

#startGame {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    padding: 15px 25px;
    background: #ff6b35;
    color: white;
    border: 3px solid #8B4513;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

#startGame:hover {
    background: #f7931e;
    transform: scale(1.05);
}

#startGame:active {
    transform: scale(0.95);
}

/* Leaderboard Styles */
.leaderboard-section {
    margin-top: 20px;
    background: #2c1810;
    padding: 15px;
    border-radius: 10px;
    border: 3px solid #8B4513;
}

.leaderboard-section h3 {
    color: #ffd23f;
    font-size: 0.8rem;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0px #8B4513;
}

.leaderboard {
    max-height: 200px;
    overflow-y: auto;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #654321;
    margin: 5px 0;
    padding: 8px 12px;
    border-radius: 5px;
    border: 2px solid #8B4513;
    font-size: 0.6rem;
}

.leaderboard-entry.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #2c1810;
    border-color: #ffd700;
    font-weight: bold;
}

.leaderboard-entry.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #2c1810;
    border-color: #c0c0c0;
}

.leaderboard-entry.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #daa520);
    color: white;
    border-color: #cd7f32;
}

.leaderboard-rank {
    font-weight: bold;
    min-width: 20px;
}

.leaderboard-name {
    flex: 1;
    margin: 0 10px;
    text-align: left;
}

.leaderboard-score {
    font-weight: bold;
    color: #ff6b35;
}

.loading {
    text-align: center;
    color: #ffd23f;
    font-size: 0.6rem;
    padding: 20px;
}

.leaderboard-error {
    text-align: center;
    color: #ff6b35;
    font-size: 0.6rem;
    padding: 20px;
}

.game-screen {
    background: #654321;
    border-radius: 10px;
    padding: 20px;
    border: 3px solid #8B4513;
}

.assembly-line {
    background: #2c1810;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 3px solid #654321;
}

.conveyor-belt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #8B4513;
    padding: 15px;
    border-radius: 5px;
    border: 2px solid #654321;
    position: relative;
    overflow: hidden;
}


.ingredient {
    width: 60px;
    height: 60px;
    background: #ffd23f;
    border: 3px solid #8B4513;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.2s ease-out;
    position: relative;
    animation: float 3s ease-in-out infinite;
    will-change: transform;
    transform-origin: center;
}

.ingredient:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
    animation-play-state: paused;
}

.ingredient:active {
    transform: scale(0.9);
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) scale(1); 
    }
    50% { 
        transform: translateY(-2px) scale(1.01); 
    }
}

.next-ingredient {
    text-align: center;
    background: #2c1810;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 3px solid #654321;
}

.next-ingredient h3 {
    color: #ffd23f;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.next-ingredient-display {
    font-size: 3rem;
    animation: pulse 1.5s infinite;
}

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

.doenertello {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: #654321;
    padding: 20px;
    border-radius: 10px;
    border: 3px solid #8B4513;
}

.turtle {
    font-size: 4rem;
    animation: wiggle 3s infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.speech-bubble {
    background: white;
    color: #2c1810;
    padding: 15px 20px;
    border-radius: 20px;
    border: 3px solid #2c1810;
    font-size: 0.6rem;
    max-width: 300px;
    position: relative;
    animation: bob 2s infinite;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
}

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

.game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.doe-message {
    background: #ff6b35;
    color: white;
    padding: 40px;
    border-radius: 20px;
    border: 5px solid #8B4513;
    text-align: center;
    /* animation: shake 0.5s infinite; */
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.doe-message h2 {
    font-size: 3rem;
    color: #ffd23f;
    text-shadow: 3px 3px 0px #8B4513;
    margin-bottom: 20px;
    /* animation: flash 0.3s infinite; */
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Level Up Celebration Styles */
.level-up-celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.5s ease-in-out;
}

.celebration-content {
    background: linear-gradient(135deg, #ff6b35, #f7931e, #ffd23f);
    color: white;
    padding: 60px;
    border-radius: 30px;
    border: 8px solid #8B4513;
    text-align: center;
    animation: celebrationBounce 1s ease-in-out;
    position: relative;
    overflow: hidden;
}

.celebration-content h2 {
    font-size: 4rem;
    color: #ffd23f;
    text-shadow: 4px 4px 0px #8B4513;
    margin-bottom: 20px;
    animation: textGlow 2s infinite;
}

.level-number {
    font-size: 6rem;
    color: #ff6b35;
    text-shadow: 4px 4px 0px #2c1810;
    margin: 20px 0;
    animation: numberPulse 1s infinite;
}

.celebration-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    animation: textFloat 3s infinite;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffd23f;
    border-radius: 50%;
    animation: particleFloat 3s infinite;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes celebrationBounce {
    0% { transform: scale(0.5) rotate(-10deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes textGlow {
    0%, 100% { text-shadow: 4px 4px 0px #8B4513, 0 0 20px #ffd23f; }
    50% { text-shadow: 4px 4px 0px #8B4513, 0 0 40px #ffd23f, 0 0 60px #ff6b35; }
}

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

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

@keyframes particleFloat {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-200px) rotate(360deg);
        opacity: 0;
    }
}

/* Score Animation */
.score-animation {
    position: absolute;
    font-size: 2rem;
    color: #ffd23f;
    font-weight: bold;
    text-shadow: 2px 2px 0px #8B4513;
    pointer-events: none;
    animation: scoreFloat 2s ease-out forwards;
}

@keyframes scoreFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1.5);
        opacity: 0;
    }
}

/* Kebap Bonus Animation */
.kebap-bonus-animation {
    position: absolute;
    color: #ff6b35;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 0px #8B4513;
    z-index: 1000;
    pointer-events: none;
    animation: kebapBonusFloat 2s ease-out forwards;
}

@keyframes kebapBonusFloat {
    0% { 
        transform: translateY(0px) scale(1); 
        opacity: 1; 
    }
    50% { 
        transform: translateY(-30px) scale(1.3); 
        opacity: 1; 
    }
    100% { 
        transform: translateY(-80px) scale(1.5); 
        opacity: 0; 
    }
}

/* Kebap Bonus Ingredient Animation */
.ingredient.kebap-bonus {
    animation: kebapBonusPulse 0.8s ease-in-out;
}

@keyframes kebapBonusPulse {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Ingredient Success Animation */
.ingredient-success {
    animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); box-shadow: 0 0 30px #4CAF50; }
    100% { transform: scale(1); }
}

/* Combo Animation */
.combo-display {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    border: 3px solid #8B4513;
    font-size: 1.2rem;
    font-weight: bold;
    animation: comboSlide 0.5s ease-out;
}

@keyframes comboSlide {
    0% { transform: translateX(100px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

/* Life Recovery Animations */
@keyframes lifeRecoveryFloat {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -70%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -120%) scale(1);
        opacity: 0;
    }
}

@keyframes lifeRecoveryFlash {
    0%, 100% { 
        background: transparent; 
    }
    25% { 
        background: rgba(76, 175, 80, 0.3); 
    }
    50% { 
        background: rgba(76, 175, 80, 0.1); 
    }
    75% { 
        background: rgba(76, 175, 80, 0.2); 
    }
}

.life-recovery-animation {
    font-family: 'Press Start 2P', monospace;
    animation: lifeRecoveryFloat 2s ease-out forwards;
}

/* Life Recovery Hint */
.life-recovery-hint {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    border: 3px solid #2E7D32;
    border-radius: 15px;
    padding: 15px;
    margin: 10px 0;
    text-align: center;
    animation: hintPulse 2s infinite;
}

.hint-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.hint-icon {
    font-size: 1.5rem;
    animation: heartBeat 1s infinite;
}

.hint-text {
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 0px #2E7D32;
}

@keyframes hintPulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    }
    50% { 
        transform: scale(1.02); 
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
    }
}

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

/* Combo Explosion Animations */
.combo-explosion {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    font-size: 3rem;
    animation: explosionBurst 1.5s ease-out forwards;
}

@keyframes explosionBurst {
    0% {
        transform: scale(0.5) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(3) rotate(360deg);
        opacity: 0;
    }
}

.kebap-explosion {
    color: #ff6b35;
    text-shadow: 0 0 20px #ff6b35;
}

.turtle-explosion {
    color: #4CAF50;
    text-shadow: 0 0 20px #4CAF50;
}

/* Flying Background Animations */
.flying-object {
    position: fixed;
    pointer-events: none;
    z-index: -1;
    font-size: 2rem;
    opacity: 0.3;
    animation: smoothFloat 8s linear infinite;
}

.flying-turtle {
    color: #4CAF50;
    animation: smoothFloat 12s linear infinite;
}

.flying-kebap {
    color: #ff6b35;
    animation: smoothFloat 10s linear infinite;
}

@keyframes smoothFloat {
    0% {
        transform: translateX(-100px) translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Combo Celebration Effects */
.combo-celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5000;
}

.combo-particles {
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #ffd23f, #ff6b35);
    border-radius: 50%;
    animation: particleExplosion 2s ease-out forwards;
}

@keyframes particleExplosion {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1) rotate(180deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

.doe-message p {
    font-size: 0.8rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

#restartGame {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    padding: 15px 25px;
    background: #8B4513;
    color: white;
    border: 3px solid #2c1810;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

#restartGame:hover {
    background: #654321;
    transform: scale(1.05);
}

/* Responsive design */
@media (max-width: 600px) {
    h1 {
        font-size: 1rem;
    }
    
    .turtle-kebap {
        font-size: 2rem;
    }
    
    .ingredient {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .turtle {
        font-size: 3rem;
    }
    
    .next-ingredient-display {
        font-size: 2rem;
    }
    
    .speech-bubble {
        font-size: 0.5rem;
        padding: 10px 15px;
    }
}

/* Disclaimer Styles */
.disclaimer {
    text-align: center;
    margin-top: 20px;
    padding: 10px 15px;
    background: rgba(44, 24, 16, 0.9);
    border-radius: 8px;
    border: 2px solid #654321;
    width: 100%;
    box-sizing: border-box;
}

.disclaimer p {
    color: #ffd23f;
    font-size: 0.5rem;
    line-height: 1.4;
    margin: 0;
    text-shadow: 1px 1px 0px #8B4513;
}

@media (max-width: 600px) {
    .disclaimer p {
        font-size: 0.4rem;
    }
    
    .social-link {
        padding: 6px;
    }
    
    .social-icon {
        font-size: 2rem;
    }
    
    .turtle-kebap {
        gap: 10px;
    }
}
