/* ==================== App Bar (Fixed Top) ==================== */
.app-bar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--border-light);
}

.app-bar.home-bar {
    justify-content: center;
}

.app-bar .back-btn {
    position: absolute;
    left: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: var(--bg-card-hover);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.app-bar .bar-title {
    position: absolute;
    width: 100%;
    text-align: center;
    left: 0;
    font-size: 1.15rem;
    font-weight: 700;
    z-index: -1; 
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    pointer-events: none;
}

/* ==================== Home Screen ==================== */
.home-screen {
    padding: 35px 16px; /* 상단 여백 24px -> 35px */
    background: #f0f4f8;
}

.home-welcome {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 40px; /* 상단 여백 30px -> 40px */
    padding: 0 20px;
    animation: fadeInDown 0.8s ease-out;
}

.home-welcome h1 {
    font-size: 2.15rem;
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -1.5px;
}

.home-welcome p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 20px;
}

.feature-request-btn {
    background: white;
    color: var(--accent-blue);
    border: 1.5px solid var(--accent-blue);
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.feature-request-btn:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    border-color: transparent;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.home-item {
    background: white;
    border-radius: 20px;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.8);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-height: 110px;
}

.home-item:active {
    transform: scale(0.92);
}

.item-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.item-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

.home-item.item-empty {
    background: rgba(255, 255, 255, 0.3);
    border: 1px dashed rgba(0,0,0,0.1);
    box-shadow: none;
    cursor: default;
    pointer-events: none;
}

/* ==================== Sections ==================== */
.app-section {
    display: none;
}

.app-section.active {
    display: block;
    padding-top: 30px; /* 모든 페이지 상단 여백 사용자 요청 반영 (40px -> 30px) */
    animation: fadeInSlide 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.section {
    padding-bottom: 40px; /* 모든 섹션 하단에 여유 공간 추가 */
}

.section-header {
    margin-bottom: 30px; /* 헤더와 컨텐츠 간 간격 확대 (25px -> 30px) */
}

.section-header h2 {
    font-size: 1.6rem;
    margin-bottom: 5px;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==================== Footer ==================== */
.app-footer { 
    padding: 20px 0; 
    background: #f8fafc; 
    border-top: 1px solid var(--border-light); 
    margin-top: 20px;
}
.footer-grid { 
    display: flex; 
    flex-direction: column; 
    gap: 30px; 
}
.footer-bottom { 
    text-align: center; 
    padding-top: var(--spacing-md); 
    border-top: 1px solid var(--border-light); 
    color: var(--text-muted); 
    font-size: 0.875rem; 
}

.xhs-footer-card {
    background: white; border-radius: var(--radius-lg); padding: 16px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
}

.xhs-qr-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.xhs-info-section h4 { font-size: 1rem; color: var(--text-primary); margin-bottom: 4px; }
.xhs-info-section .xhs-id { font-size: 0.8rem; color: #ff2442; font-weight: 700; margin-bottom: 2px; }
.xhs-info-section p { font-size: 0.75rem; color: var(--text-muted); }
.xhs-qr-box { width: 80px; height: 80px; background: #f8fafc; border-radius: 8px; padding: 4px; border: 1px solid var(--border-light); }
.xhs-qr-box img { width: 100%; height: 100%; object-fit: contain; }

/* QR Section */
.footer-qr-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 20px auto;
    padding: 10px;
}

.qr-item {
    text-align: center;
    transition: transform 0.3s ease;
}

.qr-item:hover {
    transform: translateY(-5px);
}

.qr-img {
    width: 140px;
    height: 140px;
    border-radius: 16px;
    background: white;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: block;
    margin-bottom: 12px;
    border: 1px solid rgba(0,0,0,0.03);
}

.qr-label {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

/* ==================== Responsive ==================== */
@media (max-width: 480px) {
    .home-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .item-icon {
        font-size: 1.8rem;
    }
    .item-label {
        font-size: 0.75rem;
    }
    .home-welcome h1 {
        font-size: 1.5rem;
    }
}
