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

body {
    font-family: 'Poppins', sans-serif;
    background-color: #0f0f0f;
    color: #f5f5f5;
    line-height: 1.6;
    overflow-x: hidden;
}

.section {
    min-height: 100vh;
    padding: 80px 5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #ffffff;
}

h1 {
    font-size: 3rem;
    background: linear-gradient(90deg, #ff6f61, #feca57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2.2rem;
    color: #feca57;
}

h3 {
    font-size: 1.5rem;
    color: #48dbfb;
}

p {
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.cta-button {
    background: linear-gradient(135deg, #ff6f61, #feca57);
    color: #0f0f0f;
    padding: 12px 28px;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 111, 97, 0.4);
}

.nav {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: 15px;
    z-index: 1000;
}

.nav a {
    color: #f5f5f5;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 10px;
    transition: background 0.3s ease, color 0.3s ease;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #feca57;
}

.home {
    background: linear-gradient(135deg, #1e1e1e, #0f0f0f);
}

.hidden {
    display: none;
}

/* Mixing Board and Ingredient Buttons */
.mixing-board {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.ingredient-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.ingredient {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 10px 20px;
    color: #ffffff;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.ingredient:hover,
.ingredient.selected {
    background: linear-gradient(135deg, #48dbfb, #1dd1a1);
    transform: scale(1.1);
    color: #0f0f0f;
}

.result {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    border-radius: 15px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    animation: fadeIn 0.5s ease-in-out;
}

.result h3 {
    font-size: 1.6rem;
    color: #48dbfb;
}

.result .design {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6f61, #feca57);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: #0f0f0f;
    margin-top: 15px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
#contact form {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

#contact input,
#contact textarea {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 15px;
    color: #f5f5f5;
    font-size: 1rem;
    width: 100%;
    resize: none;
    outline: none;
    transition: border 0.3s ease, background 0.3s ease;
}

#contact input:focus,
#contact textarea:focus {
    border: 1px solid #feca57;
    background: rgba(255, 255, 255, 0.12);
}

#form-message {
    margin-top: 10px;
    font-size: 1rem;
    color: #48dbfb;
}

/* Toast Notification */
#toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.8);
    color: #f5f5f5;
    padding: 12px 20px;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
}

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

/* Palette Generator Grid */
#palette-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 15px;
    margin-top: 20px;
    max-width: 400px;
    width: 100%;
}

.palette-color {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.palette-color:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.color-label {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.5);
    color: #f5f5f5;
    font-size: 0.7rem;
    padding: 2px 4px;
    border-radius: 4px;
}

/* Fade-in animation for sections */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Device Modal Styling */
#device-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.device-frame {
    border: none;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Shake animation for result box */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* === Responsive Adjustments === */
@media (max-width: 1024px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .nav {
        flex-direction: column;
        gap: 10px;
        top: 15px;
        right: 15px;
        padding: 8px 12px;
    }
    .section {
        padding: 60px 5%;
    }
    #palette-container {
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.3rem; }
    .cta-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
