@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Fredoka', 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(135deg, #e0f7fa 0%, #f3e5f5 50%, #e1f5fe 100%);
    min-height: 100vh;
    padding: 40px 20px;
    color: #5a3e5e;
    position: relative;
    overflow-x: hidden;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

.game-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8fdff 100%);
    border-radius: 30px;
    padding: 35px;
    box-shadow: 0 20px 60px rgba(77, 208, 225, 0.2),
                0 10px 30px rgba(186, 104, 200, 0.2);
    max-width: 600px;
    width: 90%;
    margin: 0 auto 40px;
    text-align: center;
    position: relative;
    border: 5px solid transparent;
    background-image:
        linear-gradient(white, white),
        linear-gradient(135deg, #4dd0e1 0%, #ba68c8 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}


h1 {
    background: linear-gradient(135deg, #26c6da 0%, #ab47bc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    font-size: 2.5em;
    font-weight: 700;
    letter-spacing: 1px;
}

.level-info {
    background: linear-gradient(135deg, #e0f7fa 0%, #f3e5f5 100%);
    padding: 18px;
    border-radius: 20px;
    margin: 20px 0;
    border: 3px solid transparent;
    background-image:
        linear-gradient(135deg, #e0f7fa 0%, #f3e5f5 100%),
        linear-gradient(135deg, #4dd0e1 0%, #ba68c8 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 4px 15px rgba(77, 208, 225, 0.2);
}

.level-title {
    font-size: 1.6em;
    background: linear-gradient(135deg, #26c6da 0%, #ab47bc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-weight: 600;
}


.level-details {
    color: #7b1fa2;
    font-size: 1em;
    font-weight: 500;
}

.secret-display {
    background: linear-gradient(135deg, #5a3e5e 0%, #7c5a7f 100%);
    color: white;
    padding: 18px;
    border-radius: 20px;
    margin: 20px 0;
    font-family: 'Fredoka', cursive;
    font-size: 1.3em;
    font-weight: 600;
    border: 3px solid #9c27b0;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}


.bottles-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.bottle {
    width: 70px;
    height: 95px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75em;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    position: relative;
    user-select: none;
    border-radius: 15px 15px 20px 20px;
    border: 4px solid rgba(0,0,0,0.15);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2),
                inset 0 2px 10px rgba(255,255,255,0.5),
                inset 0 -2px 10px rgba(0,0,0,0.1);
}

.bottle::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 12px;
    background: inherit;
    border-radius: 8px 8px 0 0;
    border: 4px solid rgba(0,0,0,0.15);
    border-bottom: none;
    z-index: 2;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}

.bottle::after {
    content: '😊';
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8em;
    z-index: 3;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
}


.bottle:hover {
    transform: translateY(-8px) scale(1.08) rotate(-3deg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3),
                inset 0 2px 12px rgba(255,255,255,0.6),
                inset 0 -2px 10px rgba(0,0,0,0.1);
}

.bottle:hover::after {
    content: '😄';
}

.bottle.selected {
    transform: translateY(-5px) scale(1.12);
    box-shadow: 0 0 20px rgba(255,215,0,0.8),
                0 0 35px rgba(255,215,0,0.5),
                0 8px 25px rgba(0,0,0,0.3),
                inset 0 2px 15px rgba(255,255,255,0.5);
    animation: pulse 1.5s ease-in-out infinite;
}

.bottle.selected::after {
    content: '🤩';
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 25px rgba(255,215,0,0.8),
                    0 0 40px rgba(255,215,0,0.4),
                    0 10px 30px rgba(0,0,0,0.3);
    }
    50% {
        box-shadow: 0 0 35px rgba(255,215,0,1),
                    0 0 60px rgba(255,215,0,0.6),
                    0 12px 35px rgba(0,0,0,0.4);
    }
}

.bottle.dragging {
    opacity: 0.5;
    transform: scale(1.1);
    z-index: 1000;
}

.bottle.drag-over {
    border-color: #48bb78;
    border-width: 4px;
    box-shadow: 0 0 15px rgba(72, 187, 120, 0.5);
}

.bottle.red {
    background: linear-gradient(180deg,
        #ff9999 0%,
        #ff6b9d 50%,
        #ff4757 100%);
}
.bottle.blue {
    background: linear-gradient(180deg,
        #89d4f7 0%,
        #4fc3f7 50%,
        #29b6f6 100%);
}
.bottle.green {
    background: linear-gradient(180deg,
        #a8e6a3 0%,
        #81c784 50%,
        #66bb6a 100%);
}
.bottle.yellow {
    background: linear-gradient(180deg,
        #fff9c4 0%,
        #ffeb3b 50%,
        #fdd835 100%);
}
.bottle.purple {
    background: linear-gradient(180deg,
        #dda8e8 0%,
        #ce93d8 50%,
        #ba68c8 100%);
}
.bottle.orange {
    background: linear-gradient(180deg,
        #ffcc80 0%,
        #ffb74d 50%,
        #ffa726 100%);
}
.bottle.brown {
    background: linear-gradient(180deg,
        #d7ccc8 0%,
        #bcaaa4 50%,
        #a1887f 100%);
}
.bottle.pink {
    background: linear-gradient(180deg,
        #ffc4dd 0%,
        #f48fb1 50%,
        #ec407a 100%);
}

.guess-section {
    margin: 30px 0;
}

.guess-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #e0f7fa 0%, #f8f9ff 100%);
    border-radius: 20px;
    border: 2px solid #b3e5fc;
    box-shadow: 0 2px 10px rgba(77, 208, 225, 0.15);
}

.guess-bottles {
    display: flex;
    gap: 8px;
}

.guess-bottle {
    width: 52px;
    height: 70px;
    font-size: 0.65em;
    border-radius: 12px 12px 15px 15px;
    border: 3px solid rgba(0,0,0,0.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2),
                inset 0 2px 8px rgba(255,255,255,0.4),
                inset 0 -2px 8px rgba(0,0,0,0.1);
}

.guess-bottle::before {
    top: -6px;
    width: 22px;
    height: 10px;
    border: 3px solid rgba(0,0,0,0.15);
}

.guess-bottle::after {
    content: '😊';
    font-size: 1.5em;
    top: 35%;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.feedback {
    display: flex;
    gap: 5px;
    align-items: center;
}

.peg {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3),
                inset 0 2px 4px rgba(255,255,255,0.4),
                inset 0 -2px 4px rgba(0,0,0,0.3);
    position: relative;
}

.peg::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 4px;
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    filter: blur(1px);
}

.peg.black {
    background: radial-gradient(circle at 30% 30%,
        #7a5e7e 0%,
        #5a3e5e 40%,
        #3d2a40 100%);
}
.peg.white {
    background: radial-gradient(circle at 30% 30%,
        #ffffff 0%,
        #f5f5f5 40%,
        #e8e8e8 100%);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2),
                inset 0 2px 4px rgba(255,255,255,0.8),
                inset 0 -2px 4px rgba(0,0,0,0.1);
}

.controls {
    margin: 20px 0;
}

button {
    background: linear-gradient(145deg, #4dd0e1, #ba68c8);
    color: white;
    border: 3px solid white;
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    margin: 5px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(77, 208, 225, 0.4);
    font-family: 'Fredoka', cursive;
}

button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(77, 208, 225, 0.6);
    background: linear-gradient(145deg, #26c6da, #ab47bc);
}

button:active {
    transform: translateY(-1px) scale(1.02);
}

button:disabled {
    background: linear-gradient(145deg, #e0e0e0, #d0d0d0);
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

.submit-btn {
    background: linear-gradient(145deg, #4dd0e1, #26c6da);
    font-size: 1.3em;
    padding: 16px 35px;
    box-shadow: 0 6px 20px rgba(77, 208, 225, 0.5);
}

.submit-btn:hover {
    background: linear-gradient(145deg, #26c6da, #00acc1);
}

.next-level-btn {
    background: linear-gradient(145deg, #ba68c8, #ab47bc);
    box-shadow: 0 6px 20px rgba(186, 104, 200, 0.4);
}

.restart-btn {
    background: linear-gradient(145deg, #ce93d8, #ba68c8);
    box-shadow: 0 6px 20px rgba(206, 147, 216, 0.4);
}


.stats {
    background: #edf2f7;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

.completion-screen {
    display: none;
    text-align: center;
    padding: 30px;
}

.completion-screen h2 {
    background: linear-gradient(135deg, #26c6da 0%, #ab47bc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.8em;
    margin-bottom: 20px;
    font-weight: 700;
    animation: rainbow 3s ease infinite;
}

@keyframes rainbow {
    0%, 100% {
        background: linear-gradient(135deg, #26c6da 0%, #ab47bc 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    50% {
        background: linear-gradient(135deg, #ab47bc 0%, #26c6da 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

.final-stats {
    background: linear-gradient(135deg, #e0f7fa 0%, #f3e5f5 100%);
    padding: 25px;
    border-radius: 20px;
    margin: 20px 0;
    border: 3px solid transparent;
    background-image:
        linear-gradient(135deg, #e0f7fa 0%, #f3e5f5 100%),
        linear-gradient(135deg, #4dd0e1 0%, #ba68c8 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 4px 20px rgba(77, 208, 225, 0.3);
}

.feedback-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ffffff 0%, #f8fdff 100%);
    padding: 35px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(77, 208, 225, 0.3);
    z-index: 1000;
    text-align: center;
    border: 5px solid transparent;
    background-image:
        linear-gradient(white, white),
        linear-gradient(135deg, #4dd0e1 0%, #ba68c8 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    min-width: 320px;
    animation: popupShow 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}


.feedback-popup h3 {
    background: linear-gradient(135deg, #26c6da 0%, #ab47bc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    font-size: 1.8em;
    font-weight: 700;
}

.feedback-popup .feedback-details {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
}

.feedback-popup .feedback-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    font-size: 1.2em;
}

.feedback-popup .feedback-icon {
    font-size: 1.5em;
    margin-right: 10px;
}

.feedback-popup .close-btn {
    background: linear-gradient(145deg, #4299e1, #3182ce);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 15px;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    animation: overlayShow 0.3s ease-out;
}

@keyframes popupShow {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

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

.success-feedback {
    border-color: #48bb78;
}

.success-feedback h3 {
    color: #38a169;
}

@media (max-width: 600px) {
    .game-container {
        padding: 20px;
        margin: 10px;
    }

    .bottles-container {
        gap: 5px;
    }

    .bottle {
        width: 60px;
        height: 80px;
    }

    .bottle::after {
        font-size: 1.5em;
    }

    h1 {
        font-size: 2em;
    }

    .feedback-popup {
        min-width: 280px;
        padding: 20px;
    }
}

/* SEO Content Section */
.game-info {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: left;
    color: #333;
}

.game-info h2 {
    background: linear-gradient(135deg, #26c6da 0%, #ab47bc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2em;
    margin-bottom: 15px;
    text-align: center;
}

.game-info h3 {
    color: #00acc1;
    font-size: 1.5em;
    margin-top: 25px;
    margin-bottom: 10px;
}

.game-info p {
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1.05em;
}

.game-info ul, .game-info ol {
    margin-left: 25px;
    margin-bottom: 20px;
}

.game-info li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.game-info strong {
    color: #ab47bc;
}

@media (max-width: 768px) {
    .game-info {
        padding: 20px;
        margin: 20px;
    }

    .game-info h2 {
        font-size: 1.6em;
    }

    .game-info h3 {
        font-size: 1.3em;
    }
}