@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap');

:root {
    --primary-color: #4361ee;
    --primary-hover: #3a56d4;
    --bg-gradient: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    --card-bg: #ffffff;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --input-bg: #f8f9fa;
    --input-border: #dfe6e9;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* General Styles */
body {
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    width: 90%;
    max-width: 420px;
    text-align: center;
    animation: fadeIn 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

h1 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 1.3rem;
    color: var(--text-main);
    margin-bottom: 1.2rem;
    font-weight: 600;
}

/* Forms and Inputs */
form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

input[type="text"],
input[type="password"],
input[type="tel"],
input[type="email"] {
    padding: 1rem;
    border: 2px solid var(--input-border);
    border-radius: 12px;
    font-size: 1rem;
    background-color: var(--input-bg);
    color: var(--text-main);
    transition: all 0.3s ease;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: #b2bec3;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

button {
    padding: 1rem;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2);
}

button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(67, 97, 238, 0.3);
}

button:active {
    transform: translateY(0);
}

.button-group {
    margin-top: 2rem;
}

.button-group p {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.error-message {
    color: #e74c3c;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    background-color: #fff5f5;
    padding: 8px;
    border-radius: 8px;
    display: none; /* Only show when has text */
}

a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Survey Page */
.survey-question {
    text-align: left;
    margin-bottom: 1.5rem;
    border: 2px solid var(--input-border);
    padding: 1.5rem;
    border-radius: 16px;
    background-color: #fff;
    transition: border-color 0.3s;
}

.survey-question:focus-within {
    border-color: var(--primary-color);
}

.survey-question p {
    margin-top: 0;
    font-weight: 600;
    color: var(--text-main);
    font-size: 1.05rem;
}

.survey-question label {
    display: flex;
    align-items: center;
    margin: 0.6rem 0;
    cursor: pointer;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background-color: var(--input-bg);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.survey-question label:hover {
    background-color: #edf2ff;
    border-color: #bac8ff;
}

.survey-question input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

/* Home Page Styles */
body.home-body {
    display: block;
    background: #f8f9fc;
    padding: 0;
}

.home-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
    animation: fadeIn 0.8s ease;
}

header {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    margin-bottom: 2rem;
    position: relative;
}

header h1 {
    font-size: 1.6rem;
    margin: 0;
    color: var(--text-main);
}

#logoutButton {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: #fff0f0;
    color: #ff4d4d;
    border: 1px solid #ffcccc;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    box-shadow: none;
    border-radius: 10px;
}

#logoutButton:hover {
    background: #ff4d4d;
    color: #fff;
    transform: none;
}

main {
    background: transparent;
    box-shadow: none;
    width: 100%;
}

/* Tab contents and layout */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.store-list-container {
    display: flex;
    gap: 1.5rem;
}

.store-column {
    background: #fff;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    border: 1px solid #edf2f7;
}

.store-column h3 {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}

.store-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.store-column li {
    background: #fff;
    padding: 1.2rem;
    margin-bottom: 1rem;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
    transition: transform 0.2s;
}

.store-column li:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

/* Chatbot UI - Premium Look */
.chat-container {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    height: 70vh;
    border: 1px solid #f1f5f9;
    overflow: hidden;
}

.chat-window {
    flex-grow: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.chat-message {
    padding: 1rem 1.4rem;
    border-radius: 20px;
    max-width: 80%;
    line-height: 1.6;
    font-size: 0.95rem;
}

.user-message {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.2);
}

.bot-message {
    background: #f1f5f9;
    color: var(--text-main);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.chat-input {
    display: flex;
    padding: 1rem 1.5rem;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    align-items: center;
    gap: 10px;
}

#chatInput {
    flex-grow: 1;
    border: none;
    padding: 0.8rem;
    font-size: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
}

#chatSendButton {
    width: 45px;
    height: 45px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    min-width: 45px;
}

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

/* Map Modal */
.map-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.map-modal-content {
    background: #fff;
    margin: 3% auto;
    width: 90%;
    max-width: 900px;
    height: 85vh;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.map-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
}

.map-modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-main);
}

.close-modal {
    background: #f1f5f9;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
    padding: 0;
}

.close-modal:hover {
    background: #ffe0e0;
    color: #ff4d4d;
    transform: rotate(90deg);
}

.modal-map-view {
    flex: 1;
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.modal-map-view iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}
