:root {
    --primary-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --bg-color: #f2f4f6;
    /* App background (outside container) */
    --app-bg: #ffffff;
    /* Container background */
    --text-main: #191919;
    --text-sub: #767676;
    /* Catchtable gray */
    --border-color: #f2f4f6;
    --white: #ffffff;
    --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    --safe-area-bottom: env(safe-area-inset-bottom);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Mobile Container for PC View */
.app-container {
    width: 100%;
    max-width: 480px;
    background-color: var(--app-bg);
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    /* Subtle shadow for depth */
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    /* Strict centering */
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 12px;
    border-bottom: 1px solid var(--border-color);
}

.header-logo {
    font-size: 1.2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.header-actions {
    display: flex;
    gap: 16px;
    margin-left: auto;
}

.header-center-title {
    position: static;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111;
    pointer-events: auto;
    margin-left: 2px;
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    display: inline-block;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 0 0 80px 0;
    /* Bottom padding for nav bar */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    /* Centering Fix for Fixed Position */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;

    background: #fff;
    height: 56px;
    /* Matched to typical app nav height */
    height: calc(56px + var(--safe-area-bottom));
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    /* Spread evenly */
    align-items: center;
    padding: 0 12px var(--safe-area-bottom);
    /* Padding match */
    z-index: 1000;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #999;
    font-size: 10px;
    gap: 3px;
    height: 100%;
    padding-top: 4px;
}

.nav-item .material-symbols-outlined {
    font-size: 24px;
    line-height: 1;
}

.nav-item.active {
    color: #111;
    font-weight: 600;
}

.nav-item span.icon {
    font-size: 24px;
}

/* Special Write Button */
.nav-item.write-btn {
    position: static;
    top: 0;
}

.nav-item.write-btn .icon-circle {
    width: auto;
    height: auto;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    box-shadow: none;
    border: none;
}

@media (max-width: 420px) {
    .app-header {
        justify-content: flex-start;
        gap: 8px;
        padding: 0 12px;
    }
    .header-center-title {
        position: static;
        left: auto;
        transform: none;
        pointer-events: auto;
        margin-left: 2px;
        flex: 1 1 auto;
        min-width: 0;
        text-align: left;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .header-actions {
        margin-left: auto;
        gap: 8px;
    }
}

/* Store Cards (Catchtable Style) */
.store-item {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 24px;
}

.store-image-container {
    width: 100%;
    height: 60vw;
    max-height: 280px;
    position: relative;
    overflow: hidden;
    background: #f2f2f2;
}

.store-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-info {
    padding: 16px 20px 0 20px;
}

.store-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.store-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
}

.store-meta {
    font-size: 0.85rem;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    gap: 6px;
}

.store-score {
    color: #dc2743;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 2px;
}

.store-desc {
    font-size: 0.9rem;
    color: #111;
    margin-top: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard property */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.store-tags {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    color: #666;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Utilities */
.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 24px 20px 12px;
}

.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 0 20px 20px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

/* Loading States */
.loading-spinner {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px;
}

/* Login/Signup Overrides for Mobile Container */
.auth-container {
    width: 100%;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.form-input {
    width: 100%;
    padding: 14px 0;
    border: none;
    border-bottom: 1px solid #ddd;
    border-radius: 0;
    font-size: 1rem;
    background: transparent;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-bottom-color: #111;
    box-shadow: none;
}

.btn-primary {
    background: #dc2743;
    /* Solid Red for primary actions */
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-align: center;
    margin-top: 20px;
}
