/* Colorful Coffee Game Styles */
#coffee-game-container {
    width: 640px;
    height: 360px;
    margin: 0 auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    font-family: 'Arial', sans-serif;
}

/* Game Header */
.game-header {
    text-align: center;
    margin-bottom: 10px;
}

.game-header h2 {
    color: white;
    font-size: 16px;
    margin: 0 0 5px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.game-header p {
    color: #e0e0e0;
    font-size: 11px;
    margin: 0;
    opacity: 0.9;
}

/* Coffee Animation */
.coffee-animation {
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.coffee-cup {
    position: relative;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.coffee-cup.zoomed {
    transform: scale(1.8);
    z-index: 10;
}

.cup-body {
    width: 50px;
    height: 40px;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    border-radius: 0 0 15px 15px;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border: 3px solid #5a3921;
    overflow: hidden;
}

.cup-liquid {
    width: 44px;
    height: 30px;
    background: linear-gradient(135deg, #4C2F27, #5a3921);
    border-radius: 0 0 12px 12px;
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
}

.cup-handle {
    width: 12px;
    height: 15px;
    border: 3px solid #5a3921;
    border-left: none;
    border-radius: 0 10px 10px 0;
    position: absolute;
    right: 5px;
    top: 10px;
}

.steam {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.steam-particle {
    width: 6px;
    height: 20px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.8), transparent);
    border-radius: 3px;
    animation: steamRise 2s infinite ease-in-out;
}

.steam-particle:nth-child(1) {
    animation-delay: 0s;
}

.steam-particle:nth-child(2) {
    animation-delay: 0.5s;
}

.steam-particle:nth-child(3) {
    animation-delay: 1s;
}

.thank-you-message {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.coffee-cup.zoomed .thank-you-message {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

@keyframes steamRise {
    0% {
        transform: translateY(0) scaleY(1);
        opacity: 0;
    }

    50% {
        transform: translateY(-15px) scaleY(1.2);
        opacity: 0.8;
    }

    100% {
        transform: translateY(-30px) scaleY(1);
        opacity: 0;
    }
}

/* Progress Section */
.progress-section {
    position: relative;
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 50px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF6B6B, #FFE66D, #4ECDC4, #45B7D1);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 6px;
}

/* Ingredients Grid */
.ingredients-grid {
    display: flex;
    justify-content: center;
    gap: 8px;
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
}

.ingredient {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-width: 70px;
}

.ingredient:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: #667eea;
}

.ingredient.active {
    background: linear-gradient(135deg, #FF6B6B, #FFE66D);
    border-color: #FF6B6B;
}

.ingredient.completed {
    opacity: 0.6;
    cursor: default;
}

.ingredient.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ingredient.loading {
    opacity: 0.7;
    cursor: wait;
}

.ingredient-icon {
    width: 35px;
    height: 35px;
    margin-bottom: 5px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
}

.ingredient:hover .ingredient-icon {
    transform: scale(1.1);
}

.ingredient-label {
    font-size: 10px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

/* Ingredient Icons */
.coffee-seed {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><ellipse cx="50" cy="50" rx="25" ry="15" fill="%238B4513" transform="rotate(30 50 50)"/></svg>');
}

.hot-water {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M 30,30 L 70,30 L 65,70 L 35,70 Z" fill="%2348D1CC" opacity="0.9"/></svg>');
}

.sugar {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="15" y="15" width="70" height="70" rx="15" fill="%23FFD700"/></svg>');
}

.milk {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M 30,20 Q 50,5 70,20 L 65,75 Q 50,85 35,75 Z" fill="%23FFFFFF"/></svg>');
}

.final-cup {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M 25,35 L 75,35 L 80,75 L 20,75 Z" fill="%238B4513"/><path d="M 75,40 L 90,35 L 90,70 L 75,65 Z" fill="%23A0522D"/></svg>');
}

/* Success Screen */
.success-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 20;
}

.success-screen.hidden {
    display: none;
}

.completion-message {
    text-align: center;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.completion-message h2 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 18px;
}

.completion-message p {
    color: #7f8c8d;
    margin: 0;
    font-size: 14px;
}

.download-section {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.download-section h3 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 16px;
}

.download-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

.download-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.download-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

.download-icon {
    font-size: 20px;
    margin-bottom: 5px;
}

.download-btn span {
    font-size: 11px;
    font-weight: bold;
}

.countdown-timer {
    background: rgba(52, 152, 219, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.countdown-timer p {
    margin: 0;
}

/* Tab Status */
.tab-status {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

.tab-status.hidden {
    display: none;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 680px) {
    #coffee-game-container {
        width: 100%;
        height: auto;
        min-height: 400px;
    }

    .ingredients-grid {
        flex-wrap: wrap;
        gap: 5px;
    }

    .ingredient {
        min-width: 60px;
        padding: 5px;
    }

    .download-buttons {
        flex-wrap: wrap;
    }
}