:root {
    --primary-color: #ff4757;
    --secondary-color: #2f3542;
    --bg-color: #f1f2f6;
    --card-bg: rgba(255, 255, 255, 0.8);
    --text-color: #2f3542;
    --border-radius: 12px;
    --transition-speed: 0.3s;
    --glass-blur: 10px;
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

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

body {
    font-family: 'Inter', 'Noto+Sans+KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(var(--glass-blur));
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-btn {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    letter-spacing: -1px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.logo-btn:hover {
    opacity: 0.8;
}

/* Custom Dropdown */
.custom-dropdown {
    position: relative;
    width: 140px;
    font-size: 0.9rem;
    user-select: none;
}

.dropdown-selected {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.dropdown-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    box-shadow: var(--shadow);
    display: none;
    z-index: 1001;
    overflow: hidden;
}

.custom-dropdown.active .dropdown-options {
    display: block;
}

.option {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.option:hover {
    background: var(--bg-color);
}

.flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}

.main-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    min-height: calc(100vh - 160px);
}

/* Step Layouts */
.step-container {
    animation: fadeIn var(--transition-speed) ease-out;
}

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

h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 700;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Card Buttons */
.card-btn {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.card-btn:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.card-btn.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.card-btn img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    background: #eee;
}

/* Utility Buttons */
.controls-top {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
}

.btn-small:hover {
    background: #f8f9fa;
}

.btn-confirm {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 2rem auto;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results Page */
#map {
    width: 100%;
    height: 400px;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    background: #ddd;
}

/* #disqus_thread {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
} */

.footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    color: #777;
}

@media (max-width: 600px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
