* {
    box-sizing: border-box;
}

:root {
    --bg:            #0c0b18;
    --surface:       #141320;
    --elevated:      #1e1c2e;
    --border:        rgba(240, 235, 224, 0.09);
    --border-gold:   rgba(232, 184, 75, 0.2);
    --text:          #f0ebe0;
    --text-muted:    rgba(240, 235, 224, 0.48);
    --text-dim:      rgba(240, 235, 224, 0.24);
    --accent:        #e8b84b;
    --accent-hover:  #f2c85c;
    --accent-dark:   #c4901f;
    --danger:        #e05252;
    --danger-hover:  #c94040;
    --error:         #ff7575;
    --success-text:  #6ee7a0;
    --radius-sm:     8px;
    --radius-md:     12px;
    --radius-lg:     18px;
}

body {
    margin: 0;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", Roboto, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Header ───────────────────────────────────────── */

.site-header {
    background-color: #0d0c1a;
    border-bottom: 1px solid var(--border-gold);
    padding: 1rem 0;
}

.brand {
    color: var(--accent);
    text-decoration: none;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: color 0.15s;
}

.brand:hover {
    color: var(--accent-hover);
}

.brand-logo {
    height: 100px;
    width: auto;
    display: block;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-username {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.logout-form {
    margin: 0;
}

/* ── Footer ───────────────────────────────────────── */

.site-footer {
    margin-top: 4rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    text-align: center;
}

/* ── Main ─────────────────────────────────────────── */

main.container {
    padding-top: 2.5rem;
    padding-bottom: 3rem;
}

/* ── Flash messages ───────────────────────────────── */

.flash-message {
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.25);
    color: var(--success-text);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
}

.flash-message.error {
    background: rgba(255, 100, 100, 0.08);
    border-color: rgba(255, 100, 100, 0.25);
    color: #ff8585;
}

/* ── Toolbar ──────────────────────────────────────── */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.toolbar h1 {
    margin: 0;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--surface);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.sort-select:focus {
    outline: none;
    border-color: var(--border-gold);
    color: var(--text);
}

/* ── Buttons ──────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s,
                background-color 0.15s, border-color 0.15s, color 0.15s;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #0e0b1a;
    border-color: transparent;
    box-shadow: 0 2px 12px rgba(232, 184, 75, 0.25);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(232, 184, 75, 0.42);
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: rgba(240, 235, 224, 0.25);
    color: var(--text);
    background-color: rgba(240, 235, 224, 0.04);
}

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

.btn-danger:hover {
    background-color: var(--danger-hover);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.3rem 0.72rem;
    font-size: 0.78rem;
}

/* ── Movie grid ───────────────────────────────────── */

.movie-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
}

@media (max-width: 960px) {
    .movie-grid { grid-template-columns: repeat(3, 1fr); }
}

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

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

.movie-card {
    background-color: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    animation: cardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.movie-card:nth-child(1)  { animation-delay: 0ms; }
.movie-card:nth-child(2)  { animation-delay: 30ms; }
.movie-card:nth-child(3)  { animation-delay: 60ms; }
.movie-card:nth-child(4)  { animation-delay: 90ms; }
.movie-card:nth-child(5)  { animation-delay: 120ms; }
.movie-card:nth-child(6)  { animation-delay: 150ms; }
.movie-card:nth-child(7)  { animation-delay: 180ms; }
.movie-card:nth-child(8)  { animation-delay: 210ms; }
.movie-card:nth-child(9)  { animation-delay: 240ms; }
.movie-card:nth-child(10) { animation-delay: 270ms; }
.movie-card:nth-child(11) { animation-delay: 300ms; }
.movie-card:nth-child(12) { animation-delay: 330ms; }
.movie-card:nth-child(13) { animation-delay: 360ms; }
.movie-card:nth-child(14) { animation-delay: 390ms; }
.movie-card:nth-child(15) { animation-delay: 420ms; }

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.55),
                0 0 0 1px var(--border-gold);
    border-color: var(--border-gold);
}

.movie-thumb {
    width: 100%;
    aspect-ratio: 2 / 3;
    background-color: var(--elevated);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 0.8rem;
}

.movie-info {
    padding: 0.75rem;
    border-top: 1px solid var(--border);
}

.movie-title {
    margin: 0 0 0.4rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-rating {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.8rem;
}

.empty-state {
    text-align: center;
    padding: 5rem 1rem;
    color: var(--text-muted);
}

.empty-state a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.empty-state a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ── Pagination ───────────────────────────────────── */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    background-color: var(--surface);
    font-size: 0.88rem;
    transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}

.pagination a:hover {
    border-color: var(--border-gold);
    color: var(--accent);
    background-color: rgba(232, 184, 75, 0.06);
}

.pagination .active {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-color: transparent;
    color: #0e0b1a;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(232, 184, 75, 0.3);
}

.pagination .disabled {
    color: var(--text-dim);
    background-color: transparent;
    cursor: not-allowed;
    opacity: 0.4;
}

/* ── Modal ────────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(6, 5, 20, 0.82);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal-overlay.open {
    display: flex;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal {
    background: linear-gradient(158deg, #1c1a2e 0%, #131220 100%);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.5),
        0 30px 80px rgba(0, 0, 0, 0.7),
        0 0 80px rgba(232, 184, 75, 0.04);
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-dim);
    line-height: 1;
    transition: color 0.15s;
    padding: 0.2rem;
}

.modal-close:hover {
    color: var(--text-muted);
}

.modal-body {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
}

.modal-body .modal-thumb {
    width: 200px;
    aspect-ratio: 2 / 3;
    background-color: var(--elevated);
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.modal-body .no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.modal-details dl {
    margin: 0;
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 0.5rem 0.75rem;
}

.modal-details dt {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding-top: 0.15rem;
}

.modal-details dd {
    margin: 0;
    font-size: 0.9rem;
    word-break: break-word;
    white-space: pre-wrap;
    color: var(--text);
}

.modal-details .rating-display {
    color: var(--accent);
    font-weight: 700;
    font-size: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
    .modal-body .modal-thumb {
        width: 100%;
        max-width: 220px;
        margin: 0 auto;
    }
    .modal-details dl {
        grid-template-columns: 80px 1fr;
    }
}

/* ── Form page ────────────────────────────────────── */

.form-page h1 {
    margin: 0 0 1.75rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.form {
    background: linear-gradient(158deg, #1a1828 0%, #131220 100%);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.form-field input[type="text"],
.form-field input[type="date"],
.form-field textarea {
    width: 100%;
    padding: 0.72rem 0.95rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(240, 235, 224, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.93rem;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-field input[type="date"] {
    color-scheme: dark;
}

.form-field textarea {
    min-height: 100px;
    resize: vertical;
}

.form-field input[type="text"]:focus,
.form-field input[type="date"]:focus,
.form-field textarea:focus {
    outline: none;
    border-color: rgba(232, 184, 75, 0.55);
    background: rgba(232, 184, 75, 0.04);
    box-shadow: 0 0 0 3px rgba(232, 184, 75, 0.1);
}

.form-field input[type="file"] {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.4rem 0;
}

.form-field small {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.char-counter {
    text-align: right;
    color: var(--text-dim);
    font-size: 0.78rem;
}

.field-error {
    color: var(--error);
    font-size: 0.8rem;
}

/* ── Chip group ───────────────────────────────────── */

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip-group input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background-color: var(--surface);
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.chip:hover {
    border-color: var(--border-gold);
    color: var(--accent);
    background-color: rgba(232, 184, 75, 0.06);
}

.chip-group input[type="radio"]:checked + .chip {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #0e0b1a;
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(232, 184, 75, 0.3);
}

/* ── Star rating ──────────────────────────────────── */

.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.stars {
    position: relative;
    display: inline-block;
    font-size: 2rem;
    letter-spacing: 0.15rem;
    color: rgba(240, 235, 224, 0.12);
    user-select: none;
}

.stars .stars-bg::before,
.stars .stars-fg::before {
    content: "★★★★★";
}

.stars .stars-fg {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    width: 0;
    color: var(--accent);
    pointer-events: none;
}

.stars .star-slot {
    position: absolute;
    top: 0;
    height: 100%;
    cursor: pointer;
}

.rating-value {
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent);
    min-width: 2.2rem;
}

.rating-display-static {
    font-size: 1.2rem;
    color: var(--accent);
    letter-spacing: 0.1rem;
}

/* ── Thumbnail preview ────────────────────────────── */

.thumb-preview {
    width: 180px;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius-sm);
    background-color: var(--elevated);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    border: 1px dashed var(--border-gold);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.form-actions .left,
.form-actions .right {
    display: flex;
    gap: 0.5rem;
}

/* =====================================================
   AUTH PAGES — CINEMA DARK THEME
   ===================================================== */

.auth-scene {
    padding: 3.5rem 1.5rem 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72vh;
    position: relative;
}

.auth-scene::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 560px;
    height: 560px;
    background: radial-gradient(ellipse, rgba(232, 184, 75, 0.07) 0%, transparent 68%);
    pointer-events: none;
    z-index: 0;
}

.auth-container {
    position: relative;
    z-index: 1;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    background: linear-gradient(158deg, #1e1c2e 0%, #131220 100%);
    border: 1px solid rgba(232, 184, 75, 0.18);
    border-radius: 18px;
    padding: 2.5rem 2.5rem 2.25rem;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.45),
        0 28px 72px rgba(0, 0, 0, 0.65),
        0 0 90px rgba(232, 184, 75, 0.05);
    animation: authFadeIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.auth-brand {
    text-align: center;
    margin-bottom: 1.4rem;
}

.film-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #e8b84b 0%, #c4901f 100%);
    font-size: 1.55rem;
    box-shadow:
        0 6px 22px rgba(232, 184, 75, 0.45),
        0 0 0 1px rgba(232, 184, 75, 0.25);
}

.film-strip {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 1.6rem;
    opacity: 0.45;
}

.film-hole {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: rgba(232, 184, 75, 0.22);
    border: 1px solid rgba(232, 184, 75, 0.42);
}

.auth-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: #f0ebe0;
    text-align: center;
    margin: 0 0 0.4rem;
    letter-spacing: -0.015em;
}

.auth-subtitle {
    text-align: center;
    color: rgba(240, 235, 224, 0.38);
    font-size: 0.83rem;
    margin: 0 0 1.75rem;
    letter-spacing: 0.01em;
}

.form-group {
    margin-bottom: 1.15rem;
}

.form-group label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(240, 235, 224, 0.5);
    margin-bottom: 0.48rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.72rem 0.95rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(240, 235, 224, 0.1);
    border-radius: 9px;
    color: #f0ebe0;
    font-size: 0.93rem;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: rgba(232, 184, 75, 0.55);
    background: rgba(232, 184, 75, 0.04);
    box-shadow: 0 0 0 3px rgba(232, 184, 75, 0.1);
}

.form-control::placeholder {
    color: rgba(240, 235, 224, 0.17);
}

.auth-container .btn-primary {
    background: linear-gradient(135deg, #e8b84b 0%, #c4901f 100%);
    color: #0e0b1a;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.03em;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(232, 184, 75, 0.38);
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
    margin-top: 0.35rem;
    cursor: pointer;
}

.auth-container .btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(232, 184, 75, 0.52);
}

.auth-container .btn-primary:active {
    transform: translateY(0);
    filter: brightness(0.97);
}

.auth-container .flash-message {
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.25);
    color: #6ee7a0;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    font-size: 0.83rem;
    margin-bottom: 1.2rem;
}

.auth-container .flash-message.error {
    background: rgba(255, 100, 100, 0.08);
    border-color: rgba(255, 100, 100, 0.25);
    color: #ff8585;
}

.auth-container .field-error {
    display: block;
    color: #ff7575;
    font-size: 0.77rem;
    margin-top: 0.35rem;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.83rem;
    color: rgba(240, 235, 224, 0.32);
    border-top: 1px solid rgba(240, 235, 224, 0.07);
    padding-top: 1.25rem;
}

.auth-link a {
    color: #e8b84b;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}

.auth-link a:hover {
    color: #f2c85c;
    text-decoration: underline;
}

@media (max-width: 480px) {
    .auth-container {
        padding: 2rem 1.5rem 1.75rem;
        border-radius: 14px;
    }
    .auth-title  { font-size: 1.35rem; }
    .auth-scene  { padding: 2rem 1rem 3rem; }
}

/* ── My Page: Sidebar Layout ─────────────────────────────────── */
.my-page-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
    margin-top: 2rem;
}

.my-page-sidebar {
    position: sticky;
    top: 5rem;
}

.side-nav {
    display: flex;
    flex-direction: column;
    background: rgba(20, 19, 32, 0.85);
    border: 1px solid rgba(232, 184, 75, 0.12);
    border-radius: 14px;
    overflow: hidden;
    padding: 0.5rem 0;
}

.side-nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.1rem;
    color: rgba(240, 235, 224, 0.55);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-left: 3px solid transparent;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.side-nav-link:hover {
    color: rgba(240, 235, 224, 0.85);
    background: rgba(232, 184, 75, 0.06);
    border-left-color: rgba(232, 184, 75, 0.35);
}

.side-nav-link.active {
    color: #e8b84b;
    background: rgba(232, 184, 75, 0.08);
    border-left-color: #e8b84b;
    font-weight: 600;
}

.my-page-content {
    min-width: 0;
}

/* ── My Page: Card nickname ──────────────────────────────────── */
.card-nickname {
    font-size: 0.73rem;
    color: rgba(240, 235, 224, 0.38);
    margin-top: 0.25rem;
    letter-spacing: 0.01em;
}

/* ── My Page: Profile form ───────────────────────────────────── */
.profile-card {
    background: rgba(20, 19, 32, 0.85);
    border: 1px solid rgba(232, 184, 75, 0.12);
    border-radius: 16px;
    padding: 2rem 2rem 1.75rem;
    max-width: 480px;
}

.current-nickname-label {
    font-size: 0.85rem;
    color: rgba(240, 235, 224, 0.5);
    margin-bottom: 1.5rem;
}

.current-nickname-label strong {
    color: rgba(240, 235, 224, 0.85);
    font-weight: 600;
}

.input-row {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

.input-row .form-control {
    flex: 1;
}

.input-row .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.field-hint {
    display: block;
    font-size: 0.78rem;
    margin-top: 0.4rem;
    color: rgba(240, 235, 224, 0.45);
    min-height: 1.1em;
}

.field-hint.field-success {
    color: #6ee7a0;
}

.field-hint.field-error {
    color: #ff8585;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.84rem;
    margin-bottom: 1.25rem;
}

.alert-success {
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.22);
    color: #6ee7a0;
}

/* ── Modal: Star Rating ──────────────────────────────────────── */
.modal-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

.modal-star {
    position: relative;
    font-size: 1.05rem;
    line-height: 1;
    color: rgba(240, 235, 224, 0.2);
    display: inline-block;
}

.modal-star.full {
    color: #e8b84b;
}

.modal-star.empty {
    color: rgba(240, 235, 224, 0.2);
}

.modal-star.half {
    color: rgba(240, 235, 224, 0.2);
}

.half-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 52%;
    overflow: hidden;
    color: #e8b84b;
    display: inline-block;
    line-height: inherit;
}

.modal-star-value {
    font-size: 0.8rem;
    color: rgba(240, 235, 224, 0.55);
    margin-left: 0.4rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
}

/* ── Responsive: My Page ─────────────────────────────────────── */
@media (max-width: 768px) {
    .my-page-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .my-page-sidebar {
        position: static;
    }

    .side-nav {
        flex-direction: row;
        border-radius: 10px;
        padding: 0;
    }

    .side-nav-link {
        flex: 1;
        justify-content: center;
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 0.65rem 0.5rem;
        font-size: 0.82rem;
    }

    .side-nav-link:hover {
        border-left-color: transparent;
        border-bottom-color: rgba(232, 184, 75, 0.35);
    }

    .side-nav-link.active {
        border-left-color: transparent;
        border-bottom-color: #e8b84b;
    }

    .profile-card {
        padding: 1.5rem 1.25rem;
    }
}
