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

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --primary-bg: rgba(99,102,241,.08);
    --accent: #8b5cf6;
    --accent-light: #ede9fe;

    --bg: #f5f5f7;
    --bg-card: #ffffff;
    --bg-input: #f8f9fc;
    --bg-input-focus: #ffffff;

    --border: #e2e4ea;
    --border-focus: #6366f1;
    --border-light: #f0f0f4;

    --text: #1a1a2e;
    --text-secondary: #555770;
    --text-muted: #8b8da3;
    --text-placeholder: #b0b3c6;

    --success: #10b981;
    --success-bg: #ecfdf5;
    --error: #ef4444;
    --error-bg: #fef2f2;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;

    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow: 0 4px 12px rgba(0,0,0,.07);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.1);
    --shadow-primary: 0 4px 14px rgba(99,102,241,.3);

    --radius: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;
    --transition: all .2s cubic-bezier(.4,0,.2,1);
}

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

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

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

/* ─── Input / Select / Textarea ─── */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="search"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 11px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    transition: var(--transition);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

input:focus,
select:focus,
textarea:focus {
    background: var(--bg-input-focus);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3.5px rgba(99,102,241,.12);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-placeholder);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8da3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99,102,241,.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-input);
    border-color: var(--text-muted);
}

.btn-danger {
    background: var(--error);
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 7px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 12px;
}

.btn i.fa-spinner { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Card ─── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

/* ─── Alert ─── */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert.error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid #fecaca;
}

.alert.success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid #a7f3d0;
}

.alert.warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid #fde68a;
}

/* ─── Container ─── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Status Badge ─── */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.status-badge.paid { background: #dcfce7; color: #15803d; }
.status-badge.holding { background: #fef9c3; color: #a16207; }
.status-badge.cancelled { background: #fee2e2; color: #b91c1c; }
.status-badge.reserved { background: #e0e7ff; color: #4338ca; }

/* ─── Misc ─── */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none;
    left: 0;
    padding: .6rem 1.25rem .7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: .75rem;
    top: .5rem;
}

/* ─── Seat Selection Summary (JS rendered) ─── */
.selection-summary {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-input);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.selection-summary h4 {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.selection-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.sel-item span:first-child {
    flex: 1;
}

.sel-price {
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.sel-remove {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s ease;
    font-family: inherit;
    padding: 0;
    line-height: 1;
}

.sel-remove:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.sel-item.free {
    background: var(--primary-bg);
    border-color: transparent;
}

.selection-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    margin-top: 10px;
    border-top: 2px solid var(--border);
    font-size: 16px;
    font-weight: 800;
}

.total-price {
    color: var(--primary);
    font-size: 20px;
}

::selection {
    background: rgba(99,102,241,.2);
    color: var(--text);
}

/* ─── Global Mobile ─── */
@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .card { padding: 20px; }
    .btn { padding: 10px 18px; font-size: 13px; }
    .btn-lg { padding: 12px 24px; font-size: 15px; }
    .selection-summary { padding: 14px; margin-top: 16px; }
    .selection-summary h4 { font-size: 13px; margin-bottom: 10px; }
    .sel-item { padding: 8px 10px; font-size: 12px; gap: 8px; }
    .sel-remove { width: 22px; height: 22px; font-size: 12px; }
    .selection-total { font-size: 14px; padding-top: 10px; }
    .total-price { font-size: 17px; }
}
