@charset "UTF-8";

/* =========================================
   0. 폰트 & 변수
   ========================================= */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    --primary-color: #ff6b35;
    --primary-hover: #e85a2b;
    --primary-light: #ff8f6b;

    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --text-placeholder: #a5a5a5;

    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-gray: #f7f7f7;
    --bg-dark: #1a1a1a;

    --border-color: #e8e8e8;
    --border-light: #ebebeb;
    --border-medium: #d5d5d5;

    --shadow-xs: 0 1px 4px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    --radius-xs: 3px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50%;

    --header-height: 72px;
    --radius-pill: 999px;
}

/* =========================================
   1. Reset
   ========================================= */
html, body, div, span, h1, h2, h3, h4, h5, h6, p,
a, ul, li, form, label, table, tr, th, td, footer, header, nav, section {
    margin: 0; padding: 0; border: 0;
    font-size: 100%; vertical-align: baseline;
    box-sizing: border-box;
}
body {
    line-height: 1.6;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
}
ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: opacity 0.2s ease; }
a:hover { opacity: 0.85; }
img { max-width: 100%; display: block; }

input[type=text], input[type=email], input[type=password], textarea {
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 14px;
    color: var(--text-primary);
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}
input::placeholder, textarea::placeholder { color: var(--text-placeholder); }

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
}

/* =========================================
   2. 버튼 공통
   ========================================= */
   .btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}
.btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.35);
    opacity: 1;
}
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 12px 18px;
}
.btn-ghost:hover { color: var(--text-primary); opacity: 1; }
.btn-block { width: 100%; }

/* =========================================
   3. 헤더
   ========================================= */
.header {
    height: var(--header-height);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 32px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    position: sticky; top: 0; z-index: 100;
}
.header .logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; }
.header .logo img { height: 30px; width: auto; }
.header nav { display: flex; align-items: center; gap: 4px; }

/* =========================================
   4. 히어로 (index.php)
   ========================================= */
.hero {
    text-align: center;
    padding: 120px 24px;
    max-width: 720px;
    margin: 0 auto;
}
.hero h1 {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
    min-height: 44px; /* 서비스 설명 채워질 자리 */
}
.hero p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
    min-height: 26px;
}
.hero .cta { font-size: 15px; padding: 14px 36px; }

/* =========================================
   5. 인증 박스 (signup / login)
   ========================================= */
.auth-wrap {
    display: flex; align-items: center; justify-content: center;
    min-height: calc(100vh - var(--header-height));
    padding: 40px 20px;
}
.auth-box {
    width: 100%; max-width: 380px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 36px 32px;
}
.auth-box h2 { font-size: 21px; font-weight: 800; margin-bottom: 24px; text-align: center; }
.auth-box input { margin-bottom: 12px; }
.auth-box .btn { margin-top: 4px; }
.auth-box .switch-link {
    text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-tertiary);
}
.auth-box .switch-link a { color: var(--primary-color); font-weight: 700; }

.msg-box {
    margin-top: 14px; padding: 11px 14px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; text-align: center; display: none;
}
.msg-box.show { display: block; }
.msg-box.error { background: #fee2e2; color: #991b1b; }
.msg-box.success { background: #dcfce7; color: #166534; }

/* =========================================
   6. 대시보드
   ========================================= */
.container { max-width: 880px; margin: 0 auto; padding: 40px 24px 80px; }

.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.dash-header h2 { font-size: 22px; font-weight: 800; }

.post-form {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
}
.post-form input { margin-bottom: 12px; }
.post-form textarea { min-height: 160px; resize: vertical; margin-bottom: 14px; }

.post-list { display: flex; flex-direction: column; gap: 12px; }
.post-card {
    background: var(--bg-white);
    padding: 18px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 16px;
}
.post-card .title { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.post-card .preview { font-size: 13px; color: var(--text-tertiary); }
.badge {
    display: inline-block; font-size: 11px; padding: 3px 10px;
    border-radius: var(--radius-full); margin-left: 8px; font-weight: 700;
}
.badge.draft { background: #fef3c7; color: #92400e; }
.badge.used { background: #e0e7ff; color: #3730a3; }
.delete-btn {
    background: none; color: var(--text-placeholder); font-size: 13px; flex-shrink: 0;
}
.delete-btn:hover { color: #e11d48; opacity: 1; }
.empty-state { text-align: center; color: var(--text-tertiary); padding: 60px 0; font-size: 14px; }

/* =========================================
   7. 푸터
   ========================================= */
.footer { text-align: center; padding: 28px; color: var(--text-placeholder); font-size: 12px; }

/* =========================================
   8. 반응형
   ========================================= */
@media (max-width: 640px) {
    .header { padding: 0 16px; }
    .hero { padding: 80px 20px; }
    .hero h1 { font-size: 26px; }
    .post-card { flex-direction: column; }
}