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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('./beer.png') no-repeat top center fixed;
    background-size: cover;
    background-color: #f5d28b;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    position: relative;
    overflow-y: auto;
}

/* Fallback background if image fails to load */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5d28b 0%, #e6c073 50%, #d4a574 100%);
    z-index: -2;
}

/* Ensure background image is above the fallback */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/beer.png') no-repeat top center;
    background-size: cover;
    z-index: -1;
    opacity: 0.8;
}

/* Remove previous body::before background animation */
body::before {
    content: none;
}

.container {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(139, 69, 19, 0.2);
    width: 800px;
    max-width: 90vw;
    position: relative;
    border: 2px solid rgba(255, 215, 0, 0.3);
    margin-top: 150px; /* adjust as needed */
    min-height: auto;
}

h1 {
    color: #2F1B14;
    font-size: 2.5rem;
    margin-bottom: 30px;
    font-weight: 300;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(255, 215, 0, 0.3);
}

.joke-container {
    background: rgba(255, 255, 255, 0.7);
    /* backdrop-filter: blur(1px); */
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    border: 2px solid rgba(255, 215, 0, 0.4);
    position: relative;
    min-height: 200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.joke-text {
    font-size: 2.4rem;
    color: #2F1B14;
    line-height: 1.6;
    font-weight: 500;
    transition: all 0.3s ease-in-out;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.punchline {
    font-size: 1.8rem;
    color: #D2691E;
    line-height: 1.6;
    font-weight: 600;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease-in-out;
    opacity: 0;
    transform: translateY(10px);
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.punchline.show {
    opacity: 1;
    transform: translateY(0);
}

.refresh-btn {
    background: linear-gradient(45deg, #D2691E, #CD853F);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 25px;
    cursor: pointer !important;
    margin-top: 20px;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(210, 105, 30, 0.4);
    letter-spacing: 1px;
    user-select: none;
    position: relative;
    overflow: visible;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    pointer-events: auto !important;
    z-index: 10;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(210, 105, 30, 0.5);
    background: linear-gradient(45deg, #CD853F, #D2691E);
    cursor: pointer !important;
}

.refresh-btn:disabled {
    background: linear-gradient(45deg, #999, #777);
    color: #ccc;
    cursor: not-allowed !important;
    transform: none;
    box-shadow: 0 3px 10px rgba(153, 153, 153, 0.3);
}

.refresh-btn:disabled:hover {
    transform: none;
    box-shadow: 0 3px 10px rgba(153, 153, 153, 0.3);
    background: linear-gradient(45deg, #999, #777);
}

.refresh-btn {
    cursor: pointer !important;
}

.refresh-btn * {
    cursor: pointer !important;
    pointer-events: none;
}

.beer-foam {
    display: none;
}
.cheers {
    display: none;
}

.score-display {
    margin-top: 25px;
    text-align: center;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border-radius: 20px;
    padding: 15px 25px;
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
    border: 3px solid #8B4513;
    max-width: 250px;
    margin-left: auto;
    margin-right: auto;
}

.score-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #8B4513;
    letter-spacing: 2px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.score-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2F1B14;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
    font-family: 'Arial Black', sans-serif;
}

.challenge-text {
    margin-top: 15px;
    font-size: 1rem;
    font-weight: normal;
    color: #888;
    text-align: center;
    opacity: 0.7;
    transition: opacity 0.5s ease-in-out;
    position: relative;
    z-index: 10;
}

.challenge-text.hidden {
    opacity: 0;
    pointer-events: none;
}

.cheat-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(45deg, #ff4444, #cc0000);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 10px 30px rgba(255, 68, 68, 0.4);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.cheat-warning.show {
    opacity: 1;
}

.celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.cheer-item {
    position: absolute;
    font-size: 2.5rem;
    animation: cheer 4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

@keyframes cheer {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0.3) rotate(0deg);
    }
    15% {
        opacity: 1;
        transform: translateY(85vh) scale(1.1) rotate(10deg);
    }
    30% {
        opacity: 1;
        transform: translateY(70vh) scale(1.2) rotate(-5deg);
    }
    50% {
        opacity: 1;
        transform: translateY(50vh) scale(1.1) rotate(8deg);
    }
    70% {
        opacity: 1;
        transform: translateY(30vh) scale(1) rotate(-3deg);
    }
    85% {
        opacity: 0.8;
        transform: translateY(15vh) scale(0.9) rotate(5deg);
    }
    100% {
        opacity: 0;
        transform: translateY(0vh) scale(0.7) rotate(0deg);
    }
}

.score-number.celebration {
    animation: scoreCelebration 1s ease-out;
}

@keyframes scoreCelebration {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Achievement System Styles */
.achievements-container {
    margin-top: 20px;
    text-align: center;
}

.achievement {
    display: inline-block;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    margin: 5px;
    position: relative;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    border: 3px solid #8B4513;
    transition: all 0.3s ease;
    cursor: pointer;
}

.achievement:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.achievement.locked {
    background: linear-gradient(45deg, #C0C0C0, #A0A0A0);
    border-color: #666;
    opacity: 0.6;
}

.achievement-icon {
    font-size: 2rem;
    line-height: 54px;
    color: #2F1B14;
}

.achievement-tooltip {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.achievement:hover .achievement-tooltip {
    opacity: 1;
}

.achievement-unlocked {
    animation: achievementUnlock 1s ease-out;
}

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

.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #2F1B14;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
    border: 2px solid #8B4513;
    font-weight: bold;
    font-size: 1.1rem;
    z-index: 2000;
    transform: translateX(400px);
    transition: transform 0.5s ease;
}

.achievement-notification.show {
    transform: translateX(0);
}

.achievement-notification .achievement-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

/* Share Link Feature Styles - More Subtle */
.share-container {
    margin-top: 10px;
    text-align: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.share-container:hover {
    opacity: 1;
}

.share-link {
    display: none;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 8px;
    font-family: monospace;
    font-size: 0.75rem;
    word-break: break-all;
    color: #2F1B14;
    max-width: 100%;
    pointer-events: auto;
}

.share-link.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.joke-info {
    font-size: 0.75rem;
    color: #888;
    margin-top: 3px;
    font-style: italic;
}

.share-hint {
    font-size: 0.7rem;
    color: #999;
    margin-top: 5px;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    transition: color 0.3s ease;
    pointer-events: auto;
    user-select: none;
}

.share-hint:hover {
    color: #4CAF50;
}

.share-hint.copied {
    color: #4CAF50;
    animation: copiedFade 2s ease;
}

@keyframes copiedFade {
    0% { color: #4CAF50; }
    50% { color: #4CAF50; }
    100% { color: #999; }
} 