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

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: white;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Main Container */
.container {
    max-width: 800px;
    width: 100%;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    padding: 40px;
    border-radius: 20px;
}

/* Header Styles */
header {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 12px;
    transition: background-color 0.5s ease;
}

header h1 {
    font-size: 2.2em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.color-display {
    background: white;
    color: #2c5364;
    padding: 15px 30px;
    border-radius: 12px;
    margin: 15px auto;
    display: inline-block;
    font-size: 2.5em;
    letter-spacing: 3px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Message Display */
.message {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 20px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Streak Section */
.streak-section {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.streak-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px 35px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.streak-box h3 {
    font-size: 0.9em;
    margin-bottom: 8px;
    opacity: 0.9;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.streak-number {
    font-size: 2.5em;
    font-weight: 700;
    color: #00f2fe;
    text-shadow: 0 0 15px rgba(0, 242, 254, 0.5);
}

/* Control Buttons */
.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.control-btn, .mode-btn {
    padding: 12px 25px;
    font-size: 1em;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.control-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
}

.mode-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.mode-btn.selected {
    background: white !important;
    color: #203a43 !important;
    border-color: white !important;
    box-shadow: 0 4px 15px rgba(255,255,255,0.4);
}

/* Color Box Grid */
.color-box-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.color-box {
    aspect-ratio: 1;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 5px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.color-box:hover {
    transform: scale(1.08) translateY(-5px);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.3);
}

.color-box.fade {
    opacity: 0.1;
    pointer-events: none;
    transform: scale(0.9);
}

/* Shake Animation */
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-10px) rotate(-5deg); }
  50% { transform: translateX(10px) rotate(5deg); }
  75% { transform: translateX(-10px) rotate(-5deg); }
  100% { transform: translateX(0); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.6em;
    }
    
    .color-display {
        font-size: 1.5em;
        padding: 10px 20px;
    }
    
    .streak-section {
        flex-direction: row;
        gap: 15px;
    }
    
    .streak-box {
        padding: 10px 20px;
    }
    
    .streak-number {
        font-size: 2em;
    }
    
    .color-box-container {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .color-box-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .controls {
        flex-direction: column;
    }
    
    .control-btn, .mode-btn {
        width: 100%;
    }
}
