/* ===== ekphra | Where Art Meets Word ===== */

/* ===== PLAYFAIR DISPLAY — 로컬 폰트 ===== */
@font-face {
    font-family: 'Playfair Display';
    src: url('/fonts/PlayfairDisplay-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: block
}
@font-face {
    font-family: 'Playfair Display';
    src: url('/fonts/PlayfairDisplay-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
    font-display: block
}
@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: block
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --teal: #A8C5BC;
    --teal-dark: #7a9e96;
    --teal-light: #eef5f3;
    --white: #ffffff;
    --black: #111111;
    --gray-dark: #333333;
    --gray-mid: #666666;
    --gray-light: #f5f5f5;
    --border: #e0e0e0;
    --shadow: 0 2px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 40px rgba(0,0,0,0.15);
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', sans-serif;
}

/* ── Shell Layout ───────────────────────── */

html,
body {
    height: 100%;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-sans);
    background: var(--white);
    color: var(--black);
    padding-top: 46px;
}

.auth-page {
    background: #f5f5f5;
}

.site-main {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding-bottom: 40px;
}

/* ===== RICH TEXT SYSTEM ===== */
.richtext-body,
.ql-editor {
    font-family: var(--font-sans);
    font-size: 0.98rem;
    line-height: 1.55;
    color: #2f2f2f;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

.richtext-body p,
.ql-editor p {
    margin: 0 0 0.55em 0;
}

.richtext-body ul,
.richtext-body ol,
.ql-editor ul,
.ql-editor ol {
    margin: 0.2em 0 0.8em 0;
    padding-left: 1.3em;
}

.richtext-body li,
.ql-editor li {
    margin: 0 0 0.35em 0;
}

.richtext-body strong,
.richtext-body b,
.ql-editor strong,
.ql-editor b {
    font-weight: 600;
}

.richtext-body em,
.richtext-body i,
.ql-editor em,
.ql-editor i {
    font-style: italic;
}

.richtext-body a,
.ql-editor a {
    color: var(--teal);
    text-decoration: none;
    border-bottom: 1px solid var(--teal-light);
}

.richtext-body a:hover,
.ql-editor a:hover {
    color: var(--teal-dark);
    border-bottom-color: var(--teal);
}

/* ===== Buttons ===== */

.btn-primary {
    background: var(--teal);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.2s;
    width: 100%;
    margin-top: 10px;
}

.btn-primary:hover {
    background: var(--teal-dark);
    transform: translateY(-1px);
}

.btn-full { width: 100%; }

/* ===== 히어로 배너 ===== */
.hero-banner {
    width: 100%;
    height: 220px;
    background: url('/banner.jpg') center center / cover no-repeat var(--teal-light);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-overlay {
    text-align: center;
    padding: 20px 60px;
    border-radius: 4px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 3em;
    color: var(--teal-dark);
    font-style: italic;
    letter-spacing: 4px;
}

.hero-subtitle {
    font-size: 0.9em;
    color: var(--teal-dark);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 6px;
    opacity: 0.8;
}

/* ===== 폼 레이아웃 ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 20px;
}

.form-col label {
    display: block;
    font-size: 0.8em;
    color: var(--gray-mid);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    margin-top: 12px;
}

.image-upload-area {
    width: 100%;
    height: 200px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s;
    overflow: hidden;
}

.image-upload-area:hover { border-color: var(--teal); }

.image-upload-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#uploadPlaceholder {
    text-align: center;
    color: var(--gray-mid);
}

#uploadPlaceholder span { font-size: 2em; }
#uploadPlaceholder p { font-size: 0.85em; margin-top: 8px; }

/* ===== 에러/성공 메시지 ===== */
.error-msg {
    background: #ffe8e8;
    color: #c0392b;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.85em;
    margin-bottom: 15px;
    display: none;
}

.success-msg {
    background: #e8f8f7;
    color: var(--teal-dark);
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.85em;
    margin-bottom: 15px;
    display: none;
}

/* ===== 로딩 ===== */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray-mid);
    font-style: italic;
    display: none;
}

/* ===== 푸터 ===== */
.footer {
    background: var(--gray-light);
    border-top: 1px solid var(--border);
    padding: 30px;
    margin-top: 20px;
    clear: both;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    color: var(--gray-mid);
    font-size: 0.85em;
    line-height: 2;
    padding: 0 30px;
}

.footer-inner a {
    color: var(--teal);
    text-decoration: none;
}

.footer-inner a:hover { text-decoration: underline; }
.card-like-btn {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 0.8em;
    color: var(--gray-mid);
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.card-like-btn:hover { color: #e74c3c; }
.card-like-btn {
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
}
/* ===== 햄버거 메뉴 ===== */
.hamburger {
    display: none;
    background: transparent;
    border: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    padding: 7px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

/* ===== 이미지 보호 ===== */
.card-image,
.post-image-wrap img,
.profile-card img,
.like-card img {
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}
.card {
    pointer-events: auto;
}

#hero * {
    max-width: none;
}

.nav-desktop-only { display: block; }
.nav-mobile-only { display: none; }

.artist-name span { display:inline-block; color:#555; }
@keyframes ekphra-rainbow {
    0%   { color: #ffffff; }
    10%  { color: #c8b8b8; }
    25%  { color: #c4b870; }
    40%  { color: #89a88a; }
    55%  { color: #8998b8; }
    70%  { color: #a889b8; }
    85%  { color: #c4b870; }
    95%  { color: #ffffff; }
    100% { color: #555; }
}
.artist-name.rainbow-animate span:nth-child(1)  { animation: ekphra-rainbow 2.5s forwards 0s; }
.artist-name.rainbow-animate span:nth-child(2)  { animation: ekphra-rainbow 2.5s forwards 0.12s; }
.artist-name.rainbow-animate span:nth-child(3)  { animation: ekphra-rainbow 2.5s forwards 0.24s; }
.artist-name.rainbow-animate span:nth-child(4)  { animation: ekphra-rainbow 2.5s forwards 0.36s; }
.artist-name.rainbow-animate span:nth-child(5)  { animation: ekphra-rainbow 2.5s forwards 0.48s; }
.artist-name.rainbow-animate span:nth-child(6)  { animation: ekphra-rainbow 2.5s forwards 0.60s; }
.artist-name.rainbow-animate span:nth-child(7)  { animation: ekphra-rainbow 2.5s forwards 0.72s; }
.artist-name.rainbow-animate span:nth-child(8)  { animation: ekphra-rainbow 2.5s forwards 0.84s; }
.artist-name.rainbow-animate span:nth-child(9)  { animation: ekphra-rainbow 2.5s forwards 0.96s; }
.artist-name.rainbow-animate span:nth-child(10) { animation: ekphra-rainbow 2.5s forwards 1.08s; }
.artist-name.rainbow-animate span:nth-child(11) { animation: ekphra-rainbow 2.5s forwards 1.20s; }
.artist-name.rainbow-animate span:nth-child(12) { animation: ekphra-rainbow 2.5s forwards 1.32s; }
.artist-name.rainbow-animate span:nth-child(13) { animation: ekphra-rainbow 2.5s forwards 1.44s; }
.artist-name.rainbow-animate span:nth-child(14) { animation: ekphra-rainbow 2.5s forwards 1.56s; }
.artist-name.rainbow-animate span:nth-child(15) { animation: ekphra-rainbow 2.5s forwards 1.68s; }
.artist-name.rainbow-animate span:nth-child(16) { animation: ekphra-rainbow 2.5s forwards 1.80s; }
.artist-name.rainbow-animate span:nth-child(17) { animation: ekphra-rainbow 2.5s forwards 1.92s; }
.artist-name.rainbow-animate span:nth-child(18) { animation: ekphra-rainbow 2.5s forwards 2.04s; }
.artist-name.rainbow-animate span:nth-child(19) { animation: ekphra-rainbow 2.5s forwards 2.16s; }
.artist-name.rainbow-animate span:nth-child(20) { animation: ekphra-rainbow 2.5s forwards 2.28s; }

/* ===== Settings ===== */
.settings-section { margin-bottom: 30px; }
.settings-section h3 { font-family: var(--font-serif); font-size: 1.1em; color: var(--gray-dark); margin-bottom: 6px; }
.settings-help { font-size: 0.85em; color: var(--gray-mid); margin-bottom: 20px; line-height: 1.6; }
.settings-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.settings-row:last-child { border-bottom: none; }
.settings-row strong { font-size: 0.9em; color: var(--gray-dark); display: block; margin-bottom: 4px; }
.btn-danger { background: none; border: 1px solid #e74c3c; color: #e74c3c; padding: 7px 16px; border-radius: 20px; cursor: pointer; font-size: 0.82em; white-space: nowrap; transition: all 0.2s; }
.btn-danger:hover { background: #e74c3c; color: white; }

/* ── Back Link & Action Buttons ── */
.back-link {
    display: inline-block;
    font-size: 0.82em;
    color: #aaa;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    padding: 12px 40px;
    transition: color 0.2s;
}
.back-link:hover { color: var(--teal); }

.btn-action { background: none; border: 1px solid #e0e0e0; color: #999; padding: 7px 16px; border-radius: 20px; cursor: pointer; font-size: 0.82em; text-decoration: none; display: inline-block; transition: all 0.2s; font-family: 'Inter', sans-serif; }
.btn-action:hover { border-color: #999; color: #555; }
.btn-action.danger:hover { border-color: #e74c3c; color: #e74c3c; }

/* =============================================
   PAGE HERO
   3-zone structure: left | center | right
   Only background changes per page via class
   ============================================= */

.page-hero {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.page-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* ── Left zone: parent + subnav ── */
.page-hero-left {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.page-hero-parent-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.page-hero-parent {
    font-family: var(--font-serif);
    font-size: 0.82em;
    font-style: italic;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    opacity: 0.55;
    transition: opacity 0.2s;
    white-space: nowrap;
}
.page-hero-parent:hover { opacity: 0.9; }

.page-hero-subnav {
    display: flex;
    align-items: center;
    font-size: 0.75em;
    letter-spacing: 0.5px;
    margin-left: 10px;
}

.page-hero-subnav a {
    text-decoration: none;
    opacity: 0.5;
    transition: opacity 0.2s;
    white-space: nowrap;
}
.page-hero-subnav a:hover { opacity: 1; }
.page-hero-subnav a.active {
    opacity: 1;
    font-weight: 500;
}

.page-hero-subnav span {
    margin: 0 6px;
    opacity: 0.2;
}

/* ── Center zone: title ── */
.page-hero-center {
    flex-shrink: 0;
    text-align: center;
}

.page-hero-title {
    font-family: var(--font-sans);
    font-size: 0.82em;
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}
.page-hero-sub {
    margin-top: 6px;
    font-family: var(--font-sans);
    font-size: 0.66em;
    font-weight: 400;
    letter-spacing: 1.1px;
    line-height: 1.2;
    color: rgba(255,255,255,0.58);
    white-space: nowrap;
}

/* ── Right zone: action ── */
.page-hero-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.page-hero-btn {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid currentColor;
    border-radius: 2px;
    font-size: 0.7em;
    text-decoration: none;
    transition: all 0.18s;
    cursor: pointer;
    background: transparent;
    font-family: var(--font-sans);
    letter-spacing: 0.8px;
    white-space: nowrap;
    opacity: 0.55;
}
.page-hero-btn:hover { opacity: 1; }
.page-hero-btn.pending { opacity: 0.3; cursor: default; }
.page-hero-btn.pending:hover { opacity: 0.3; }

/* ── Default colors: dark bg ── */
.page-hero .page-hero-parent,
.page-hero .page-hero-subnav a,
.page-hero .page-hero-title { color: #fff; }
.page-hero .page-hero-subnav span { color: rgba(255,255,255,0.2); }

/* ── Toolbar variant: light bg ── */
.page-hero.toolbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.page-hero.toolbar .page-hero-parent,
.page-hero.toolbar .page-hero-subnav a,
.page-hero.toolbar .page-hero-title { color: #333; }
.page-hero.toolbar .page-hero-sub { color: #999; }
.page-hero.toolbar .page-hero-subnav span { color: #ccc; }
.page-hero.toolbar .page-hero-subnav a:hover { color: var(--teal-dark); }
.page-hero.toolbar .page-hero-subnav a.active {
    color: var(--black);
    font-weight: 500;
}
.page-hero.toolbar .page-hero-parent:hover { color: var(--teal-dark); }


/* ── Breadcrumb variant: terminal pages ── */
.page-hero.breadcrumb {
    background: transparent;
    border-bottom: 1px solid var(--border);
}
.page-hero.breadcrumb .page-hero-inner {
    height: 44px;
}
.page-hero.breadcrumb .page-hero-title { display: none; }
.page-hero.breadcrumb .page-hero-sub { display: none; }
.page-hero.breadcrumb .page-hero-right { display: none; }
.page-hero.breadcrumb .page-hero-parent,
.page-hero.breadcrumb .page-hero-subnav a { color: #bbb; }
.page-hero.breadcrumb .page-hero-subnav span { color: #ddd; }
.page-hero.breadcrumb .page-hero-parent:hover,
.page-hero.breadcrumb .page-hero-subnav a:hover { color: var(--teal); }


/* =========================================
   PAGE WRAP — GLOBAL PAGE CONTENT FRAME
========================================= */

.page-wrap,
.wall-container,
.artists-dir-wrap,
.board-wrap,
.profile-wrap,
.dir-wrap,
.mov-dir-wrap {
    min-height: calc(100vh - 220px);
}

.page-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 30px 80px;
}

/* =========================================
   ULTRA MINIMAL SCROLLBAR
========================================= */

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.08) transparent;
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.08);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.16);
}

/* =============================================
   Hero pages: transparent navbar + white text
   Add class="page-hero" to <body> on hero pages
   ============================================= */
body.page-hero { padding-top: 0; }
body.page-hero .navbar { position: fixed; width: 100%; background: transparent; border-bottom: none; }
body.page-hero .nav-link { color: white; }
body.page-hero .nav-link.active::after { background: white; }
body.page-hero .nav-dd-menu { background: rgba(17,17,17,0.92); }
body.page-hero .nav-dd-menu a { color: white; }
body.page-hero .nav-dd-menu a:hover { background: rgba(255,255,255,0.1); }
body.page-hero .nav-actions .btn-nav-login { color: white; border-color: rgba(255,255,255,0.5); }
body.page-hero .nav-actions .btn-nav-register { background: white; color: #111; }
body.page-hero .btn-submit { background: white; color: #111; }
body.page-hero .hamburger span { background: white; }
body.page-hero .nav-cart-icon svg { stroke: white; }

/* ── Fixed action button — bottom right (global) ── */
.btn-prime {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 900;
    padding: 10px 22px;
    font-size: 0.82em;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: var(--font-sans);
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    transition: background 0.3s, transform 0.3s;
    text-decoration: none;
    display: inline-block;
}
.btn-prime:hover {
    background: var(--teal);
    color: #fff;
    transform: translateY(-2px);
}

/* =============================================
   RESPONSIVE SYSTEM
   Keep all media queries here to prevent conflicts.
   ============================================= */

/* ----- Medium screens ----- */
@media (max-width: 1200px) {
    .masonry-wall {
        columns: 3;
    }
}

/* ----- Small tablets ----- */
@media (max-width: 800px) {
    .masonry-wall {
        columns: 2;
    }
}

/* ----- Mobile ----- */
@media (max-width: 768px) {

    .nav-desktop-only {
        display: none;
    }

    .nav-mobile-only {
        display: block;
    }

    #hero {
        height: 180px;
    }

    .modal-large {
        width: 100vw;
        height: 100vh;
        top: 0;
        left: 0;
        transform: none;
        max-width: 100%;
    }
   
    .modal-large .modal-box {
    height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
}

    .form-row,
    .modal-large .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .image-upload-area {
        height: 130px;
    }

    .modal-large .modal-textarea {
        height: 110px;
    }

    .page-hero-inner {
        height: auto;
        padding: 10px 16px;
        gap: 6px;
        flex-wrap: wrap;
    }

    .page-hero-left {
        width: 100%;
        flex: none;
    }

    .page-hero-center {
        width: 100%;
        flex: none;
        text-align: left;
    }

    .page-hero-right {
        width: 100%;
        flex: none;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 6px;
    }

    .page-hero-title {
        font-size: 0.65em;
        letter-spacing: 3px;
    }

    .page-hero-sub {
        font-size: 0.58em;
        letter-spacing: 0.7px;
        margin-top: 4px;
    }

    .page-hero-subnav {
        display: flex;
        flex-wrap: wrap;
        margin-left: 0;
        margin-top: 4px;
        gap: 2px;
    }

    .page-hero-subnav a {
        font-size: 1.1em;
        letter-spacing: 0;
        padding: 0 2px;
    }

    .page-hero-subnav span {
        margin: 0 2px;
    }

    .page-hero.breadcrumb .page-hero-inner {
        height: auto;
        padding: 8px 16px;
    }
}

/* ----- Small mobile ----- */
@media (max-width: 500px) {
    .masonry-wall {
        columns: 1;
    }
}