:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: rgba(255, 255, 255, 0.1);
    --glow-color: rgba(59, 130, 246, 0.5);
    
    --naver-color: #03c75a;
    --kakao-color: #fee500;
    --kakao-text: #000000;
}

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    padding: 20px;
}

.app-container {
    width: 100%;
    max-width: 500px;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

header {
    text-align: center;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.control-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.custom-select select {
    width: 100%;
    padding: 14px 16px;
    background-color: rgba(15, 23, 42, 0.6);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    appearance: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.custom-select select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.custom-select {
    position: relative;
}

.custom-select::after {
    content: "▼";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-secondary);
    pointer-events: none;
}

.mood-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mood-btn {
    background-color: rgba(15, 23, 42, 0.6);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    flex: 1 1 auto;
    text-align: center;
}

.mood-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.mood-btn.active {
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--text-primary);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.roulette-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-top: 10px;
}

.roulette-box {
    width: 100%;
    height: 120px;
    background: linear-gradient(145deg, rgba(30,41,59,0.8), rgba(15,23,42,0.8));
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

.roulette-text {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--glow-color);
    transition: transform 0.05s ease-in-out;
    white-space: nowrap;
}

.roulette-text.blur {
    filter: blur(2px);
    opacity: 0.8;
}

.spin-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--glow-color);
    font-family: inherit;
}

.spin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

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

.spin-btn:disabled {
    background: #475569;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.result-section {
    text-align: center;
    animation: fadeIn 0.5s ease forwards;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.result-section.hidden {
    display: none;
}

.result-section h2 {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.result-menu {
    font-size: 36px;
    font-weight: 800;
    color: #4ade80;
    margin-bottom: 12px;
    text-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
}

.result-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.map-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.map-btn {
    display: block;
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
}

.map-btn.naver {
    background-color: var(--naver-color);
    color: white;
}

.map-btn.naver:hover {
    background-color: #02b350;
}

.map-btn.kakao {
    background-color: var(--kakao-color);
    color: var(--kakao-text);
}

.map-btn.kakao:hover {
    background-color: #e6ce00;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .app-container {
        padding: 30px 20px;
    }
    
    .roulette-text {
        font-size: 26px;
    }
    
    .result-menu {
        font-size: 30px;
    }
}
