:root {
    --primary-color: #ff6b9d;
    --secondary-color: #4ecdc4;
    --accent-color: #45b7d1;
    --text-color: #2c3e50;
    --background-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --cup-transparent: rgba(255, 255, 255, 0.9);
    --cup-blue: rgba(173, 216, 230, 0.8);
    --cup-pink: rgba(255, 182, 193, 0.8);
    --cup-purple: rgba(221, 160, 221, 0.8);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    --border-radius: 15px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: var(--background-gradient);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.customization-panel {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.option-group {
    margin-bottom: 2rem;
}

.option-group h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.3rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.option-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    min-height: 60px;
}

.option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.option-btn.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    transform: translateY(-2px);
}

.color-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ddd;
}

.color-preview.transparent {
    background: linear-gradient(45deg, #ccc 25%, transparent 25%), 
                linear-gradient(-45deg, #ccc 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #ccc 75%), 
                linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
}

.color-preview.blue { background: var(--cup-blue); }
.color-preview.pink { background: var(--cup-pink); }
.color-preview.purple { background: var(--cup-purple); }

.create-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.cup-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.cup-container {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.cup {
    width: 200px;
    height: 300px;
    background: var(--cup-transparent);
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 15px 15px 25px 25px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.tea-liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70%;
    background: #8B4513;
    transition: var(--transition);
    border-radius: 0 0 22px 22px;
}

.foam {
    position: absolute;
    top: 20%;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
    border-radius: 50%;
    transform: scaleY(0.5);
}

.toppings-container {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    height: 60px;
    overflow: hidden;
}

.toppings-container .topping {
    position: absolute;
    border-radius: 50%;
    animation: dropAnimation 0.8s ease-out;
}

.toppings-container .topping.tapioca {
    width: 12px;
    height: 12px;
    background: #2c1810;
}

.toppings-container .topping.jelly {
    width: 10px;
    height: 15px;
    background: #228B22;
    border-radius: 3px;
}

.toppings-container .topping.popping {
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #ff4757, #ff3742);
}

.toppings-container .topping.pudding {
    width: 14px;
    height: 8px;
    background: #ffd700;
    border-radius: 7px;
}

.straw {
    width: 8px;
    height: 350px;
    background: linear-gradient(to right, #ff6b9d, #4ecdc4);
    border-radius: 4px;
    position: absolute;
    right: -20px;
    top: -30px;
    transform: rotate(10deg);
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.straw::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -4px;
    width: 16px;
    height: 16px;
    background: inherit;
    border-radius: 50%;
}

.cup-info {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    min-width: 250px;
}

.cup-info h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

@keyframes dropAnimation {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bubbleFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.cup {
    animation: bubbleFloat 3s ease-in-out infinite;
}

.cup.transparent { background: var(--cup-transparent); }
.cup.blue { background: var(--cup-blue); }
.cup.pink { background: var(--cup-pink); }
.cup.purple { background: var(--cup-purple); }

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .cup {
        width: 150px;
        height: 225px;
    }
    
    .customization-panel {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .option-btn {
        padding: 1rem;
    }
    
    .cup {
        width: 120px;
        height: 180px;
    }
    
    .straw {
        height: 200px;
    }
}