.container {
    max-width: 800px;
    padding-top: 20%;
    margin: 0 auto;
    background: none;
    padding: 30px;
    text-align: center;
}

h1 {
    color: #f7931a;
    margin-bottom: 30px;
    font-size: x-large;
}

/* Controls container */
.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

/* Base button style */
.controls button {
    position: relative;
    padding: 12px 24px;
    border: 2px solid #444;
    background: #222;
    color: #888;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    overflow: hidden; /* For shine effect */
}

.controls button:hover {
    border-color: #f7931a;
    color: #f7931a;
    transform: translateY(-2px);
}

/* Active button - GLOWING EFFECT */
.controls button.active {
    background: linear-gradient(45deg, #f7931a, #ffd700);
    color: #000;
    border-color: #f7931a;
    box-shadow: 0 0 20px rgba(247, 147, 26, 0.6), 0 0 40px rgba(247, 147, 26, 0.4);
    animation: pulse-glow 1.5s infinite alternate;
}

/* Shine animation */
.controls button.active::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    animation: shine 2s infinite;
}

@keyframes pulse-glow {
    from { box-shadow: 0 0 20px rgba(247, 147, 26, 0.6), 0 0 40px rgba(247, 147, 26, 0.4); }
    to { box-shadow: 0 0 30px rgba(247, 147, 26, 0.8), 0 0 60px rgba(247, 147, 26, 0.6); }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.price-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.mood-result {
    margin: 30px 0;
}

#meme-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    margin-top: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Loading state for images */
#meme-image {
    transition: opacity 0.3s ease;
}

#meme-image.loading {
    opacity: 0.5;
}

.hidden {
    display: none;
}

.error {
    color: #dc3545;
    background: #f8d7da;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.meme-btn {
    background: #6c757d !important;
    margin-top: 10px;
}

.meme-btn:hover {
    background: #5a6268 !important;
}

/* ATH Effects Styles */
@keyframes pulse {
    0%, 100% { 
        background-color: normal; 
    }
    50% { 
        background-color: #fff3cd; 
    }
}

.confetti {
    position: fixed;
    top: -10px;
    width: 10px;
    height: 10px;
    background: #f7931a;
    border-radius: 50%;
    animation: fall linear forwards;
    z-index: 1000;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.ath-notification {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.ath-popup {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border: 3px solid #f7931a;
    animation: popIn 0.3s ease-out;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.ath-popup h2 {
    color: #f7931a;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.ath-popup p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.ath-popup button {
    background: #f7931a;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
}

.ath-popup button:hover {
    background: #e58416;
    transform: translateY(-2px);
}

@keyframes popIn {
    from { 
        transform: scale(0.5); 
        opacity: 0; 
    }
    to { 
        transform: scale(1); 
        opacity: 1; 
    }
}

/* Responsive design for screens 768px wide or smaller */
@media (max-width: 768px) {
    .container {
        /* Add some padding around the content for breathing room */
        padding: 20px;
        margin: 10px;
    }

    h1 {
    padding-top: 20%;   
    }
    
    .controls {
        /* Use Flexbox to arrange items in a row */
        display: flex;

        /* Keep all buttons in a single horizontal line */
        flex-direction: row;

        /* Add small space between buttons */
        gap: 10px;

        /* Center the entire row horizontally */
        justify-content: center;

        /* Center buttons vertically if the container has height */
        align-items: center;

        /* Optional: allow wrapping if there are too many buttons to fit */
        flex-wrap: nowrap;
    }
    
    button {
        margin: 5px 0;
    }
    
    .ath-popup {
        margin: 20px;
        padding: 1.5rem;
    }
    
    .ath-popup h2 {
        font-size: 1.4rem;
    }
}

/* Landscape-specific media query */
@media (orientation: landscape) {
    h1 {
        padding-top: 5%; /* Much less padding than 20% in portrait */
        margin-bottom: 10px; /* Optional: tighten up space below */
    }
    
    .container {
        padding: 10px 20px; /* Reduce vertical padding for more space */
    }
}

/* Image Fallback Styles */
.meme-fallback {
    display: none;
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    margin-top: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    padding: 2rem;
}

.fallback-content {
    text-align: center;
    color: #6c757d;
}

.fallback-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.fallback-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #495057;
    margin-bottom: 0.5rem;
}

.fallback-message {
    font-size: 1rem;
    line-height: 1.4;
}


.image-loading {
    display: none;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

#celebration-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #f7931a;
    text-align: center;
    margin: 15px 0;
    padding: 10px;
    background: linear-gradient(45deg, #f7931a, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s infinite;
}

/* Make meme image clearly clickable */
#meme-image {
    cursor: pointer;
    transition: transform 0.1s;
}

#meme-image:hover {
    transform: scale(1.02); /* Slight zoom on hover */
    box-shadow: 0 0 20px rgba(247, 147, 26, 0.5); /* Glow effect */
}

#meme-image:active {
    transform: scale(0.98); /* Press effect */
}

.close {
    position: relative;
    margin-right: 0;
    margin-left: 90%;
}