/* CSS Variables: 디자인 통합 관리 */
:root {
    --bg: #f4f7f6; --card-bg: #ffffff; --text: #333; --border: #e0e0e0;
    --primary: #4CAF50; --danger: #ff6b6b; --input-bg: #fff;
    --shadow: 0 15px 35px rgba(0,0,0,0.08);
    --font: 'Pretendard', sans-serif;
}
body.dark-mode {
    --bg: #121212; --card-bg: #1e1e1e; --text: #e0e0e0; --border: #333;
    --input-bg: #2c2c2c; --shadow: none;
}

* { box-sizing: border-box; }
body {
    font-family: var(--font); background: var(--bg); color: var(--text);
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; margin: 0; transition: 0.3s;
}
.container {
    background: var(--card-bg); padding: 2.5rem; border-radius: 20px;
    box-shadow: var(--shadow); width: 100%; max-width: 420px; position: relative;
}

/* UI Components */
h2 { text-align: center; margin: 0 0 1.5rem; font-weight: 700; letter-spacing: -0.5px; }

.theme-toggle {
    position: absolute; top: 20px; right: 20px; background: none; border: 1px solid var(--border);
    color: var(--text); padding: 5px 12px; border-radius: 20px; cursor: pointer; font-size: 13px;
}

.tabs { display: flex; gap: 8px; margin-bottom: 20px; background: var(--border); padding: 5px; border-radius: 12px; }
.tab {
    flex: 1; padding: 10px; border: none; background: transparent; color: #777;
    cursor: pointer; font-weight: 600; border-radius: 8px; transition: 0.2s;
}
.tab.active { background: var(--card-bg); color: var(--primary); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
body.dark-mode .tab.active { background: var(--primary); color: white; }

.controls { display: flex; gap: 10px; margin-bottom: 20px; }
select {
    flex: 1; padding: 12px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--input-bg); color: var(--text); outline: none; font-size: 15px;
}
.btn-add {
    background: var(--primary); color: white; border: none; padding: 0 24px;
    border-radius: 10px; cursor: pointer; font-weight: 600;
}

ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); max-height: 250px; overflow-y: auto; }
li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 5px; border-bottom: 1px solid var(--border); animation: fadeIn 0.2s;
}
.btn-del {
    background: var(--danger); color: white; border: none; width: 24px; height: 24px;
    border-radius: 50%; margin-left: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 14px; line-height: 1;
}

.summary { text-align: right; margin-top: 25px; font-size: 1.3rem; font-weight: 800; }
.highlight { color: var(--primary); }
.btn-reset {
    width: 100%; padding: 12px; margin-top: 20px; border: none; border-radius: 10px;
    background: var(--danger); color: white; font-weight: 700; cursor: pointer;
}
.btn-reset:hover { background: #777; }

.btn-inquiry {
    max-width: 200px; padding: 10px; margin: 10px auto; border: none; border-radius: 10px;
    background: var(--primary); color: white; font-weight: 700; cursor: pointer;
    text-align: center; text-decoration: none; display: block;
}
.btn-inquiry:hover { background: #4CAF50; }

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

/* Contact Form Styles */
form { display: flex; flex-direction: column; gap: 15px; }
label { font-weight: 600; font-size: 0.9em; }
input[type="text"],
input[type="email"],
textarea {
    width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--input-bg); color: var(--text); outline: none; font-size: 15px;
}
textarea { resize: vertical; min-height: 100px; }
button[type="submit"] {
    background: var(--primary); color: white; border: none; padding: 12px;
    border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 16px;
    transition: background 0.2s;
}
button[type="submit"]:hover { background: #4CAF50; }

.back-button {
    position: absolute; top: 20px; left: 20px; background: none; border: 1px solid var(--border);
    color: var(--text); padding: 5px 12px; border-radius: 20px; cursor: pointer; font-size: 13px;
    text-decoration: none;
}

/* Success Page Styles */
.success-container p { font-size: 1.1em; line-height: 1.6; }
.success-container a {
    display: inline-block; margin-top: 20px; padding: 10px 20px;
    background: var(--primary); color: white; text-decoration: none;
    border-radius: 8px; transition: background 0.2s;
}
.success-container a:hover { background: #4CAF50; }