/* 밥FULL - 공통 스타일 (디자인 정책 적용) */

/* ===== 디자인 토큰 ===== */
:root {
    /* 컬러 */
    --primary: #f4392c;
    --primary-dark: #d42f24;
    --primary-light: #ff6254;
    --primary-glow: rgba(244, 57, 44, 0.3);
    --primary-gradient: linear-gradient(135deg, #f4392c, #ff6254);
    --black: #1a1a1a;
    --gray-dark: #333333;
    --gray: #666666;
    --gray-light: #f7f8fa;
    --gray-border: #eaedf0;
    --text-sub: #8a919e;
    --white: #ffffff;
    --bg-warm: #faf9f7;

    /* 그림자 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);

    /* 글래스모피즘 (라이트 모드) */
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);

    /* 타이포 */
    --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

    /* 사이즈 */
    --max-width: 600px;
    --header-height: 56px;

    /* 곡률 */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* 트랜지션 */
    --transition: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* ===== 레이아웃 ===== */
body {
    background: var(--bg-warm);
}

#app-wrapper {
    display: flex;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
}

#app-container {
    width: 100%;
    max-width: var(--max-width);
    min-height: 100vh;
    position: relative;
    background-color: var(--white);
}

/* QR 영역 */
#qr-area {
    display: none;
}

@media (min-width: 601px) {
    body {
        background: linear-gradient(135deg, #f5f0eb 0%, #ebe5dd 100%);
    }

    #app-container {
        box-shadow: var(--shadow-lg);
    }

    #qr-area {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 200px;
        margin-left: 32px;
        flex-shrink: 0;
    }

    .qr-placeholder {
        text-align: center;
        padding: 28px 20px;
        background: var(--glass-bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-lg);
        box-shadow: var(--glass-shadow);
        color: var(--text-sub);
        font-size: 14px;
    }

    .qr-sub {
        margin-top: 8px;
        font-size: 12px;
    }
}

/* ===== 헤더 (GNB) ===== */
#header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#header.header-intro {
    display: none;
}

.header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    transition: all var(--transition);
    color: var(--gray-dark);
}

.header-btn:active {
    background-color: var(--gray-light);
    transform: scale(0.95);
}

#header-logo {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
}

.header-logo-img {
    height: 36px;
    width: auto;
}

.header-left {
    display: flex;
    align-items: center;
    min-width: 40px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== 메인 콘텐츠 ===== */
#page-content {
    padding-top: 0;
    min-height: calc(100vh - var(--header-height));
}

/* ===== 공통 버튼 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    width: 100%;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:hover {
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-outline {
    border: 1px solid var(--gray-border);
    color: var(--gray-dark);
    background-color: var(--white);
}

.btn-outline:active {
    background-color: var(--gray-light);
    transform: scale(0.98);
}

/* ===== 공통 카드 (글래스) ===== */
.card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
}

/* ===== 공통 입력 필드 ===== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--primary);
    margin-left: 2px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--black);
    background-color: var(--white);
    transition: all var(--transition);
}

.form-input:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(244, 57, 44, 0.1);
    outline: none;
}

.form-input::placeholder {
    color: var(--text-sub);
}

.form-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='%238a919e' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ===== 토스트 ===== */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--black);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 9999;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.toast.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(10px);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== 섹션 공통 ===== */
.section-title {
    font-size: 21px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-sub);
    margin-bottom: 20px;
    line-height: 1.5;
}

.page-section {
    padding: 24px 20px;
}

/* ===== 탭 공통 ===== */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--gray-border);
    margin-bottom: 16px;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 14px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-sub);
    cursor: pointer;
    position: relative;
    transition: color var(--transition);
}

.tab-item.active {
    color: var(--primary);
    font-weight: 600;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 1px;
}

/* ===== 월 네비게이션 ===== */
.month-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 14px 0;
    margin-bottom: 16px;
}

.month-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--gray);
    transition: all var(--transition);
    border: 1px solid var(--gray-border);
}

.month-nav-btn:active {
    background-color: var(--gray-light);
    transform: scale(0.95);
}

.month-nav-title {
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-border);
    transition: background var(--transition);
}

.month-nav-title:hover {
    background: var(--gray-light);
}

/* ===== 페이지네이션 ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 0;
}

.pagination-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-sub);
    transition: all var(--transition);
    font-weight: 500;
}

.pagination-btn.active {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: 0 2px 8px var(--primary-glow);
}

.pagination-btn:hover:not(.active) {
    background: var(--gray-light);
}

/* ===== 해시태그 ===== */
.hashtag {
    display: inline-block;
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
    margin-right: 4px;
}

/* ===== 빈 상태 ===== */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-sub);
    font-size: 14px;
}

.empty-state-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ===== 스크롤바 ===== */
/* Webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(244, 57, 44, 0.25);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(244, 57, 44, 0.45);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(244, 57, 44, 0.25) transparent;
}

/* ===== 헤더 뒤로가기 버튼 ===== */
.header-back-btn:active {
    transform: scale(0.9);
}
