:root {
    --bg-color: #0f172a;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --accent: #f43f5e;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Animated Gradient Background */
.background-animation {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.15) 0%, rgba(15, 23, 42, 0) 50%),
                radial-gradient(circle at 80% 20%, rgba(244, 63, 94, 0.15) 0%, rgba(15, 23, 42, 0) 40%);
    animation: rotate 20s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem 2rem;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--glass-shadow);
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    to { transform: translateY(0); opacity: 1; }
}

header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #c4b5fd 0%, #f43f5e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.result-card {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 16px;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.result-card.active {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    border-color: rgba(139, 92, 246, 0.5);
    transform: scale(1.02);
}

.emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    transition: transform 0.2s;
}

.menu-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
}

.menu-desc {
    color: #cbd5e1;
    font-size: 0.9rem;
}

/* Shuffle animation classes */
.shuffle .emoji {
    animation: bounce 0.1s infinite alternate;
}
.shuffle .menu-name {
    opacity: 0.7;
    filter: blur(1px);
}

@keyframes bounce {
    from { transform: translateY(-5px) scale(0.95); }
    to { transform: translateY(5px) scale(1.05); }
}

.pop-in {
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Button styling */
.glow-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border: none;
    border-radius: 99px;
    padding: 1rem 2rem;
    width: 100%;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.glow-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.glow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.5);
}

.glow-btn:hover::before {
    left: 100%;
}

.glow-btn:active {
    transform: translateY(1px);
}

.glow-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
