* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 최신 모던 색상 팔레트 */
    --primary-color: #0f172a;
    --primary-dark: #020617;
    --primary-light: #1e293b;
    --accent-color: #3b82f6;
    --accent-light: #60a5fa;
    --accent-dark: #2563eb;
    --accent-gold: #f59e0b;
    --accent-gold-light: #fbbf24;
    --accent-gold-dark: #d97706;
    --secondary-color: #10b981;
    --secondary-dark: #059669;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --dark: #0f172a;
    --dark-gray: #1e293b;
    --medium-gray: #475569;
    --light: #ffffff;
    --light-gray: #f8fafc;
    --gray: #64748b;
    --border: #e2e8f0;
    --border-dark: #cbd5e1;
    
    /* 최신 부드러운 그림자 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-gold: 0 10px 15px -3px rgba(245, 158, 11, 0.2), 0 4px 6px -4px rgba(245, 158, 11, 0.1);
    
    /* 최신 그라데이션 */
    --gradient-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #fcd34d 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
    --gradient-dark: linear-gradient(180deg, #020617 0%, #0f172a 100%);
    --gradient-overlay: linear-gradient(180deg, rgba(15, 23, 42, 0.3) 0%, rgba(15, 23, 42, 0.7) 100%);
    --gradient-bid: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --gradient-price: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    
    /* 최신 둥근 모서리 */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
}

/* 상태바 영역 흰색 배경 (스크롤 시 빈 공간이 보이지 않도록) */
html {
    background-color: white;
    padding-top: var(--status-bar-height, env(safe-area-inset-top));
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #fafafa;
    color: var(--dark);
    /* 모바일 최적화 */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    letter-spacing: -0.01em;
    margin-top: 0;
}

/* 컨테이너 - 앱 스타일 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* 네비게이션 - 상단 고정 (상태바 영역 포함) */
.navbar {
    background: white;
    position: fixed;
    top: 0; /* 상단에 고정 */
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.75rem 0;
    padding-top: calc(0.75rem + var(--status-bar-height, env(safe-area-inset-top))); /* 상태바 높이 + 패딩 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 상태바 영역 흰색 배경 (스크롤 시 빈 공간이 보이지 않도록) */
.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--status-bar-height, env(safe-area-inset-top));
    background: white; /* 상태바 영역 흰색 배경 */
    z-index: -1;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    border-radius: var(--radius);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-gold);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-auth,
.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 버튼 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-weight: 600;
    letter-spacing: -0.01em;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--gradient-accent);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* 히어로 섹션 */
/* 홈 페이지 - 앱 스타일 (상세 페이지처럼) */
#home {
    display: flex;
    flex-direction: column;
    padding-top: 0; /* main에서 이미 패딩 적용 */
    padding-bottom: 80px; /* 하단 네비게이션 바 높이 */
    background: #fafafa;
}

.hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    color: var(--dark);
    padding: 3rem 1rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 50vh;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    color: var(--medium-gray);
    animation: fadeInUp 1s ease;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    animation: fadeInUp 1.2s ease;
}

.hero-buttons .btn {
    min-width: 200px;
}

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

/* 사용방법 가이드 섹션 */
.guide-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 4rem 1rem;
    position: relative;
    overflow: hidden;
    flex: 1;
}

.guide-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.guide-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease;
}

.guide-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.guide-subtitle {
    font-size: 1.125rem;
    color: var(--medium-gray);
    font-weight: 400;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

.guide-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-bottom: 4rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.guide-column {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.guide-column-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.guide-column-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.guide-column-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.guide-column-subtitle {
    font-size: 0.95rem;
    color: var(--medium-gray);
    margin: 0;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.guide-step {
    background: #f8fafc;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: left;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    animation: fadeInUp 0.8s ease;
    animation-fill-mode: both;
}

.guide-step:nth-child(1) { animation-delay: 0.1s; }
.guide-step:nth-child(2) { animation-delay: 0.2s; }
.guide-step:nth-child(3) { animation-delay: 0.3s; }
.guide-step:nth-child(4) { animation-delay: 0.4s; }

.guide-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
    background: white;
}

.step-number {
    position: absolute;
    top: -12px;
    left: 1.5rem;
    width: 32px;
    height: 32px;
    background: var(--gradient-accent);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: var(--shadow-md);
    border: 2px solid white;
}

.step-icon {
    font-size: 2.5rem;
    margin: 0.5rem 0 1rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    display: inline-block;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-description {
    font-size: 0.9rem;
    color: var(--medium-gray);
    line-height: 1.7;
    margin: 0;
}

.guide-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-light);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.feature-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--medium-gray);
    line-height: 1.6;
    margin: 0;
}

/* 경매 목록 페이지 - 앱 스타일 (상세 페이지처럼) */
#auctions {
    display: flex;
    flex-direction: column;
    padding-top: 0; /* main에서 이미 패딩 적용 */
    padding-bottom: 80px; /* 하단 네비게이션 바 높이 */
}

.auctions-section {
    background: #fafafa;
    position: relative;
    padding: 1.25rem 1rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--dark);
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
    width: 100%;
}

/* 필터 */
.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.625rem 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
    color: var(--gray);
}

.filter-btn:hover {
    border-color: rgba(0, 0, 0, 0.2);
    background: #fafafa;
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 경매 헤더 */
/* 경매 헤더 - 앱 스타일 */
.auctions-header {
    margin-bottom: 1.25rem;
    padding: 0;
}

.auctions-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
    letter-spacing: -0.02em;
    padding: 0;
}

/* 검색 바 - 앱 스타일 */
.search-bar {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    gap: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.search-icon {
    width: 20px;
    height: 20px;
    color: var(--gray);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: var(--dark);
    background: transparent;
}

.search-input::placeholder {
    color: var(--gray);
}

.filter-icon-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.filter-icon-btn svg {
    width: 20px;
    height: 20px;
}

.filter-icon-btn:hover {
    color: var(--primary-color);
}

/* 경매 정보 */
.auctions-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.25rem;
}

.auction-count {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.sort-label {
    font-size: 0.9rem;
    color: var(--gray);
}

.sort-arrow {
    width: 16px;
    height: 16px;
    color: var(--gray);
}

/* 경매 리스트 */
.auctions-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 0.5rem;
    margin-bottom: 1rem;
}

/* WebView 호환성을 위한 추가 간격 설정 */
.auctions-list > * {
    margin-bottom: 1.5rem;
}

.auctions-list > *:last-child {
    margin-bottom: 0;
}

.auction-card-modern {
    background: white;
    border-radius: var(--radius-xl);
    overflow: visible;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid var(--border);
    position: relative;
    margin-bottom: 1.5rem !important; /* WebView 호환성을 위한 !important */
}

.auction-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-dark);
}

.auction-images-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.5rem;
    height: 200px;
    padding: 0.5rem;
    position: relative;
    z-index: 1;
}

.auction-main-image {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.auction-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auction-sub-images {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auction-sub-image {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
}

.auction-sub-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auction-badges {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem 0.5rem;
    flex-wrap: wrap;
    overflow: visible;
    min-height: 2rem;
    position: relative;
    z-index: 5;
    background: white;
}

.auction-badge {
    background: #e0f7fa;
    color: #00838f;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    z-index: 6;
}

.auction-card-content {
    padding: 0 1rem 1rem;
    position: relative;
    z-index: 5;
    background: white;
}

.auction-price-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.auction-price-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.auction-price-label {
    font-size: 0.7rem;
    color: var(--gray);
    font-weight: 500;
}

.auction-price-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.02em;
}

.auction-price-bid {
    color: #ef4444;
}

.auction-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 0.75rem;
}

.auction-view-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--gray);
    font-size: 0.85rem;
}

.auction-bidder-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
}

.bidder-icon {
    width: 16px;
    height: 16px;
}

.view-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.inspection-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.auction-title-modern {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.auction-details {
    font-size: 0.85rem;
    color: var(--gray);
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.auction-time-remaining {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 8px;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
}

.auction-time-remaining .time-icon {
    width: 16px;
    height: 16px;
    stroke: #2563eb;
}

.auction-time-remaining .time-text {
    color: #2563eb;
}

.auction-time-remaining .time-text.expired {
    color: #ef4444;
}

.detail-time-remaining {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2563eb;
}

.detail-time-remaining .time-icon-small {
    width: 18px;
    height: 18px;
    stroke: #2563eb;
}

.detail-time-remaining .time-text {
    color: #2563eb;
}

.detail-time-remaining .time-text.expired {
    color: #ef4444;
}

.auction-like-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #d1d5db;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auction-like-btn:hover {
    color: #ef4444;
}

.auction-like-btn.liked {
    color: #ef4444;
}

.auction-like-btn.liked .like-icon {
    fill: #ef4444;
}

.like-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    transition: fill 0.2s ease;
}

/* 경매 그리드 (기존 스타일 유지) */
.auctions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* 정렬 모달 */
.sort-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
}

.sort-modal.show {
    display: block;
}

.sort-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.sort-modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 1.5rem;
    max-height: 50vh;
    animation: slideUp 0.3s ease;
}

.sort-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.sort-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.sort-modal-close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.sort-modal-close:hover {
    background: #f3f4f6;
}

.sort-options-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sort-option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.sort-option-item:last-child {
    border-bottom: none;
}

.sort-option-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.sort-option-item span:first-of-type {
    font-size: 0.95rem;
    color: var(--dark);
    font-weight: 500;
}

.sort-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
}

.sort-option-item input[type="radio"]:checked + span + .sort-radio {
    border-color: #10b981;
}

.sort-option-item input[type="radio"]:checked + span + .sort-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
}

/* 하단 네비게이션 바 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.75rem 0;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--gray);
    transition: color 0.2s ease;
    padding: 0.5rem 1rem;
    flex: 1;
    max-width: 120px;
}

.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.bottom-nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
}

/* 메인 콘텐츠 - 앱 스타일 (상세 페이지처럼) */
main {
    padding: 0;
    margin: 0;
    min-height: 100vh;
    background: #fafafa;
    padding-top: calc(var(--status-bar-height, env(safe-area-inset-top)) + 44px + 0.75rem * 2); /* 상태바 높이 + 네비게이션 바 높이 (패딩 포함) */
}

/* 모든 섹션을 앱 스타일로 (상세 페이지처럼) */
section {
    display: none;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    background: #fafafa;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    position: relative;
}

section[style*="display: block"],
section.active {
    display: block !important;
}

@media (max-width: 768px) {
    /* 모바일 네비게이션 바 - 상태바 아래에 위치 (겹치지 않도록) */
    .navbar {
        position: fixed;
        top: var(--status-bar-height, env(safe-area-inset-top)); /* 상태바 아래에 시작 */
        left: 0;
        right: 0;
        padding: 0.75rem 0;
        /* padding-top 제거 - top으로 위치 조정 */
    }
    
    /* 모바일에서 상태바 영역은 투명하게 (시계가 보이도록) */
    .navbar::before {
        display: none; /* 상태바 영역 배경 제거 */
    }
    
    /* 메인 콘텐츠를 네비게이션 바 아래로 내리기 */
    main {
        padding-top: calc(3.5rem + env(safe-area-inset-top)); /* 네비게이션 바 높이 + 상태바 높이 */
        padding-bottom: 80px;
    }
}

/* MY 페이지 - 앱 스타일 (상세 페이지처럼) */
#my {
    display: flex;
    flex-direction: column;
    padding-top: 0; /* main에서 이미 패딩 적용 */
    padding-bottom: 80px; /* 하단 네비게이션 바 높이 */
}

.my-section {
    background: #fafafa;
    padding: 1.25rem 1rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.my-header {
    margin-bottom: 2rem;
}

.my-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.02em;
}

/* 프로필 섹션 - 앱 스타일 */
.my-profile-section {
    text-align: center;
    padding: 1.5rem 1rem;
    background: white;
    border-radius: 16px;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.profile-image-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.profile-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-image svg {
    width: 100%;
    height: 100%;
}

.profile-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 3px solid white;
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.profile-join-date {
    font-size: 0.9rem;
    color: var(--gray);
}

.my-points-section {
    margin-bottom: 1.5rem;
}

.points-box {
    background: #f3f4f6;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.points-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    display: block;
    margin-bottom: 0.25rem;
}

.points-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.points-actions {
    display: flex;
    gap: 0.75rem;
}

.points-btn {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.points-btn:hover {
    background: #f9fafb;
    border-color: rgba(0, 0, 0, 0.2);
}

.points-history {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.points-history:hover {
    background: var(--primary-dark);
}

.my-menu-list {
    background: white;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.my-menu-item {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.my-menu-item:last-child {
    border-bottom: none;
}

.my-menu-item:hover {
    background: #f9fafb;
}

.menu-icon-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-icon {
    width: 24px;
    height: 24px;
    stroke: #10b981;
    position: absolute;
    top: 0;
    left: 0;
}

.menu-icon-car {
    width: 32px;
    height: 32px;
    stroke: #10b981;
    position: absolute;
    bottom: 0;
    right: 0;
    opacity: 0.8;
}

.menu-text {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark);
}

.menu-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray);
    margin-right: 0.5rem;
}

.menu-arrow {
    width: 20px;
    height: 20px;
    stroke: var(--gray);
}


.auction-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

.auction-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.1);
}

.auction-card:active {
    transform: translateY(-2px);
}

.auction-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #f5f5f5;
    transition: transform 0.4s ease;
}

.auction-card:hover .auction-image {
    transform: scale(1.05);
}

.auction-card-body {
    padding: 1.5rem;
}

.auction-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark);
    letter-spacing: -0.01em;
    line-height: 1.5;
}

.auction-info {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.auction-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.auction-status {
    display: inline-block;
    padding: 0.375rem 0.875rem;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.status-active {
    background: #e6f7f0;
    color: #059669;
}

.status-scheduled {
    background: #e0f2fe;
    color: #0284c7;
}

.status-ended {
    background: #f3f4f6;
    color: #6b7280;
}

.status-paused {
    background: #fef3c7;
    color: #92400e;
}

.auction-time {
    font-size: 0.9rem;
    color: var(--gray);
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease;
    overflow-y: auto;
}

.modal-large {
    max-width: 100%;
    width: 100%;
    height: 100%;
    border-radius: 0;
    padding: 0;
    margin: 0;
    max-height: 100vh;
    overflow-y: auto;
    background: white;
}

.modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: env(safe-area-inset-top);
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: none;
}

/* 경매 상세 페이지 - 앱 스타일 */
#auctionDetail {
    padding: 0;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    position: relative;
}

/* 상세 페이지 헤더 - 앱 스타일 */
.auction-detail-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 200;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    gap: 1rem;
}

.auction-detail-header .nav-brand {
    flex-shrink: 0;
}

.auction-detail-header .nav-brand h1 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--dark);
}

.detail-mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 201;
}

.detail-mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    border-radius: 3px;
    transition: all 0.3s;
}

.detail-mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.detail-mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.detail-mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.detail-nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    justify-content: center;
}

.detail-nav-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
    position: relative;
}

.detail-nav-link:hover {
    color: var(--primary-color);
}

.detail-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.detail-nav-link:hover::after {
    width: 100%;
}

.auction-detail-header .nav-user,
.auction-detail-header .nav-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.auction-detail-header .nav-user span {
    color: var(--dark);
    font-weight: 500;
    font-size: 0.9rem;
}

.detail-back-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.detail-like-btn {
    background: transparent;
    border: none;
    width: auto;
    height: auto;
    min-width: auto;
    min-height: auto;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.detail-like-btn .like-icon {
    width: 20px;
    height: 20px;
}

.detail-back-btn:active,
.detail-like-btn:active {
    background: white;
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.detail-back-btn svg {
    width: 22px;
    height: 22px;
    stroke: var(--dark);
    stroke-width: 2.5;
}

.detail-like-btn.liked .like-icon {
    fill: #ef4444;
    stroke: #ef4444;
}

.detail-like-btn:hover {
    transform: scale(1.1);
}

.detail-like-btn:active {
    transform: scale(0.95);
}

/* 상세 페이지 이미지 섹션 - 앱 스타일 */
.auction-detail-images {
    position: relative;
    background: #000;
    margin-top: calc(44px + env(safe-area-inset-top, 0px) + 0.75rem * 2);
}

.detail-main-image-container {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 300px;
    max-height: 500px;
    overflow: hidden;
    background: #000;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-x pinch-zoom;
    -webkit-touch-callout: none;
}

.detail-main-image-container:active {
    cursor: grabbing;
}

.image-slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.detail-main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.detail-main-image.active {
    opacity: 1;
    transform: scale(1);
}

.image-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.image-nav-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.image-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.image-nav-prev {
    left: 1rem;
}

.image-nav-next {
    right: 1rem;
}

.image-nav-btn svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.detail-main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inspection-badge-detail {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #ef4444;
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.image-counter {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
}

.detail-thumbnails {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.detail-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.detail-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.detail-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.detail-thumbnails::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.detail-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    min-width: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.detail-thumbnail.active {
    border-color: var(--primary-color);
}

.detail-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 상세 페이지 정보 섹션 - 앱 스타일 */
.auction-detail-info {
    padding: 1.25rem 1rem;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.detail-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.detail-price-section {
    margin-bottom: 1rem;
}

.detail-price-group {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.detail-price-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-price-label {
    font-size: 0.75rem;
    color: var(--gray);
    font-weight: 500;
}

.detail-price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.02em;
    transition: all 0.3s ease;
}

.detail-price-bid {
    color: #ef4444;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.detail-view-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.detail-bidder-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 400;
}

.view-icon-small {
    width: 16px;
    height: 16px;
    stroke: var(--gray);
}

.bidder-icon-small {
    width: 16px;
    height: 16px;
    stroke: var(--primary-color);
}

.detail-buttons {
    display: flex;
    gap: 0.75rem;
}

.detail-btn-secondary {
    padding: 0.625rem 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.detail-btn-secondary:hover {
    background: #f9fafb;
    border-color: rgba(0, 0, 0, 0.2);
}

.detail-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.spec-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: var(--light-gray);
    border-radius: 12px;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.spec-item:hover {
    background: #f1f5f9;
    border-color: rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.spec-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--medium-gray);
    letter-spacing: -0.01em;
}

.spec-item span:not(.spec-label) {
    font-size: 0.9375rem;
    color: var(--dark);
    font-weight: 600;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.spec-color-box {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.spec-item:hover .spec-color-box {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.spec-icon {
    width: 32px;
    height: 32px;
    stroke: var(--gray);
    margin-bottom: 0.25rem;
}

.spec-item span {
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 500;
}

.detail-section {
    padding: 1.5rem;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.detail-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    width: 20px;
    height: 20px;
    stroke: #10b981;
}

.recommended-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommended-list li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--dark);
    line-height: 1.6;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.option-item {
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--dark);
    text-align: center;
}

.insurance-history {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-item {
    padding: 0.875rem;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--gray);
}

/* 상세 페이지 하단 액션 바 - 앱 스타일 */
.detail-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    z-index: 1001; /* 하단 네비게이션 바(z-index: 1000)보다 높게 */
    gap: 0.75rem;
    flex-shrink: 0;
    margin-bottom: 0;
}

.price-display-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.starting-price-display {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.bid-amount-display {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.price-label {
    font-size: 0.75rem;
    color: var(--gray);
    font-weight: 500;
}

.starting-price-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.02em;
}

.bid-amount-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ef4444;
    letter-spacing: -0.02em;
    transition: all 0.3s ease;
}

.action-bar-left {
    display: flex;
    align-items: center;
}

.action-badge {
    background: #ef4444;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.action-badge.inspected {
    background: #10b981;
}

.action-bar-right {
    display: flex;
    gap: 0.75rem;
    flex: 1;
    justify-content: flex-end;
}

.action-btn-secondary {
    padding: 0.875rem 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-btn-secondary:hover {
    background: #f9fafb;
}

.action-btn-primary {
    padding: 1rem 1.5rem;
    border: none;
    background: #10b981;
    color: white;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex: 1;
    min-height: 52px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.action-btn-primary:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.action-btn-primary:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* 주요 옵션 체크박스 그리드 */
.options-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.option-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.5rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease;
    font-size: 0.8rem;
}

.option-checkbox-item:hover {
    background: #f9fafb;
}

.option-checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--primary-color);
    -webkit-appearance: checkbox;
    appearance: checkbox;
}

.option-checkbox-item input[type="checkbox"]:checked {
    accent-color: var(--primary-color);
}

.option-checkbox-item span {
    font-size: 0.75rem;
    color: var(--dark);
    user-select: none;
    line-height: 1.3;
    word-break: keep-all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-content h2 {
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    color: var(--dark);
    font-size: 2rem;
}

/* 로그인 모달 특별 스타일 */
.modal-login {
    text-align: center;
    max-width: 450px;
    padding: 3rem 2.5rem;
}

.login-logo {
    margin-bottom: 3rem;
}

.login-logo-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease;
}

.login-logo h2 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    margin-bottom: 0;
}

.modal-login .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.modal-login .form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.modal-login .form-group input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--light);
}

.modal-login .form-group input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
    background: white;
}

.modal-login .form-group input::placeholder {
    color: var(--gray);
    opacity: 0.6;
}

/* 비밀번호 입력 필드 래퍼 */
.form-group-password {
    position: relative;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 3.5rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--gray);
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--accent-gold);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.btn-login {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding: 1.1rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.btn-reset {
    margin-top: 0;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.login-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.95rem;
    color: var(--gray);
}

.login-signup-link {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    position: relative;
}

.login-signup-link:hover {
    color: var(--accent-gold-dark);
    text-decoration: underline;
}

.modal-large {
    max-width: 100%;
    width: 100%;
    height: 100%;
    border-radius: 0;
    padding: 0;
    margin: 0;
    max-height: 100vh;
    overflow-y: auto;
    background: white;
}

#auctionModal .modal-content {
    max-width: 100%;
    width: 100%;
    height: 100%;
    border-radius: 0;
    padding: 0;
    margin: 0;
    max-height: 100vh;
    overflow: hidden;
    background: white;
    display: flex;
    flex-direction: column;
}

#auctionModal .close {
    display: none;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.3s;
}

.close:hover {
    color: var(--dark);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* 폼 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
    background: white;
}

/* 입찰 섹션 */
.bid-section {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    padding: 2.5rem;
    border-radius: 24px;
    margin-top: 2rem;
    border: 2px solid var(--border);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bid-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-gold);
    border-radius: 24px 24px 0 0;
}

.bid-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.bid-section:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px -12px rgba(212, 175, 55, 0.3), 0 0 0 1px rgba(212, 175, 55, 0.2);
    border-color: var(--accent-gold);
}

.bid-section h3 {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

/* 입찰 금액 배지 */
.bid-badge {
    animation: pulse 2s infinite;
    z-index: 10;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
    }
}

@keyframes fadeInBidSuccess {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOutBidSuccess {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes scaleInBidSuccess {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* 이미지 갤러리 아이템 */
.gallery-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.bid-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.bid-input-group input {
    flex: 1;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.bid-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.bid-info-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md) !important;
}

.bid-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md) !important;
}

.bid-info {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.bid-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.bid-history {
    margin-top: 2rem;
}

.bid-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 관리자 대시보드 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

/* 모바일 메뉴 토글 버튼 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    border-radius: 3px;
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* 반응형 */
@media (max-width: 768px) {
    /* 모바일 네비게이션 바 - 상단 고정 (상태바 영역 포함) */
    .navbar {
        top: 0; /* 상단에 고정 */
        padding: 0.75rem 0;
        padding-top: calc(0.75rem + env(safe-area-inset-top)); /* 상태바 높이 + 패딩 */
    }
    
    /* 모바일에서 상태바 영역 흰색 배경 */
    .navbar::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: env(safe-area-inset-top);
        background: white; /* 상태바 영역 흰색 배경 */
        z-index: -1;
    }
    
    /* 모바일 html 상태바 영역 흰색 배경 */
    html {
        padding-top: env(safe-area-inset-top);
        background-color: white;
    }
    
    .nav-brand h1 {
        font-size: 1.1rem;
    }
    
    /* 모바일 네비게이션 */
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: calc(70px + var(--status-bar-height, env(safe-area-inset-top)));
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        max-height: calc(100vh - 70px - var(--status-bar-height, env(safe-area-inset-top)));
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-link {
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        display: block;
        width: 100%;
        text-align: left;
    }

    .nav-auth,
    .nav-user {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        padding-top: 1rem;
        border-top: 2px solid var(--border);
        margin-top: 0.5rem;
    }

    .nav-auth .btn,
    .nav-user .btn {
        width: 100%;
    }

    .nav-user span {
        width: 100%;
        text-align: center;
        padding: 0.5rem;
        font-weight: 600;
    }

    /* 컨테이너 패딩 조정 - 앱 스타일 */
    .container {
        padding: 0 0.875rem;
        max-width: 100%;
    }

    /* 히어로 섹션 - 앱 스타일 모바일 */
    #home {
        background: #fafafa;
    }

    .hero {
        padding: 2rem 0 3rem;
        min-height: 35vh;
    }

    .hero-content h2 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.875rem;
        margin-top: 1.5rem;
    }

    .hero-buttons .btn {
        width: 100%;
        min-width: auto;
    }

    /* 사용방법 가이드 섹션 모바일 */
    .guide-section {
        padding: 2.5rem 0.875rem;
    }

    .guide-title {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .guide-subtitle {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }

    .guide-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 2.5rem;
    }

    .guide-column {
        padding: 1.5rem;
    }

    .guide-column-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .guide-column-icon {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }

    .guide-column-title {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .guide-column-subtitle {
        font-size: 0.85rem;
    }

    .guide-steps {
        gap: 1.25rem;
    }

    .guide-step {
        padding: 1.25rem 1rem;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
        top: -10px;
        left: 1rem;
    }

    .step-icon {
        font-size: 2rem;
        margin: 0.25rem 0 0.75rem;
    }

    .step-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .step-description {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .guide-features {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .feature-card {
        padding: 1.5rem 1.25rem;
    }

    .feature-icon {
        font-size: 2.25rem;
        margin-bottom: 0.875rem;
    }

    .feature-card h4 {
        font-size: 1.05rem;
    }

    .feature-card p {
        font-size: 0.85rem;
    }

    /* 모든 섹션 모바일 - 앱 스타일 (상세 페이지처럼) */
    #home,
    #auctions,
    #my,
    #admin,
    #my-bids {
        padding-top: 0; /* main에서 이미 패딩 적용 */
        padding-bottom: 80px; /* 하단 네비게이션 바 높이 */
    }
    
    /* 경매 섹션 모바일 */
    .auctions-section {
        padding: 1rem 0;
    }
    
    /* 경매 헤더 모바일 */
    .auctions-header {
        margin-bottom: 1rem;
        padding: 0;
    }
    
    .auctions-title {
        font-size: 1.35rem;
        margin-bottom: 0.875rem;
    }
    
    /* 검색 바 모바일 */
    .search-bar {
        padding: 0.75rem 0.875rem;
        border-radius: 12px;
    }
    
    /* MY 페이지 모바일 */
    .my-section {
        padding: 1rem 0;
    }
    
    .my-profile-section {
        padding: 1.25rem 0.875rem;
        margin-bottom: 1rem;
    }
    
    /* 관리자 페이지 모바일 */
    .admin-section {
        padding: 1rem 0;
    }
    
    .admin-section .container {
        padding: 0 0.875rem;
    }
    

    .section-title {
        font-size: 1.5rem;
    }

    /* 경매 그리드 */
    .auctions-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .auction-card {
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .auction-card:active {
        transform: scale(0.98);
    }

    .auction-image {
        height: 220px;
    }

    .auction-card-body {
        padding: 1.25rem;
    }

    .auction-title {
        font-size: 1.1rem;
    }

    .auction-price {
        font-size: 1.3rem;
    }

    /* 필터 버튼 */
    .filters {
        gap: 0.5rem;
        padding: 0 1rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        min-height: 44px; /* 터치 최적화 */
    }

    /* 버튼 터치 최적화 */
    .btn {
        min-height: 44px;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        -webkit-tap-highlight-color: transparent;
    }

    .btn:active {
        transform: scale(0.97);
    }

    /* 모달 모바일 최적화 */
    .modal-content {
        width: 100%;
        max-width: 100%;
        padding: 1.5rem 1rem;
        padding-top: calc(1.5rem + env(safe-area-inset-top) + 20px); /* 상태바 높이 + 안전 영역 */
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom) + 20px); /* 안전 영역 + 여유 공간 */
        border-radius: 20px 20px 0 0;
        max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        margin-top: 0;
        margin-bottom: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        position: relative;
        top: 0;
    }
    
    /* 모달이 열릴 때 하단 네비게이션 바 숨기기 */
    .modal.show ~ .bottom-nav,
    body:has(.modal.show) .bottom-nav {
        display: none;
    }
    
    /* 경매 수정/생성 모달 모바일 최적화 */
    #editAuctionModal .modal-content,
    #createAuctionModal .modal-content {
        padding: 1.25rem 1rem;
        padding-top: calc(1.25rem + env(safe-area-inset-top) + 20px); /* 상태바 높이 + 안전 영역 */
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom) + 20px); /* 안전 영역 + 여유 공간 */
        max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        margin-top: 0;
        margin-bottom: 0;
        position: relative;
        top: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        display: flex;
        flex-direction: column;
    }
    
    #editAuctionModal .modal-content form,
    #createAuctionModal .modal-content form {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-right: 0.25rem;
        min-height: 0;
    }
    
    #editAuctionModal .modal-content h2,
    #createAuctionModal .modal-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .modal-large {
        max-width: 95%;
    }

    .modal-login {
        padding: 2rem 1.5rem;
        max-width: 95%;
    }

    .login-logo-icon {
        font-size: 3rem;
    }

    .login-logo h2 {
        font-size: 1.75rem;
    }

    .password-toggle {
        right: 0.75rem;
    }

    .password-input-wrapper input {
        padding-right: 3rem;
    }

    .close {
        font-size: 1.75rem;
        top: 0.75rem;
        right: 0.75rem;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.05);
    }

    /* 입찰 섹션 */
    .bid-input-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    .bid-input-group input {
        min-height: 48px;
        font-size: 1.1rem;
    }

    .bid-input-group .btn {
        width: 100%;
    }

    /* 관리자 페이지 */
    .admin-tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        background: #f8fafc;
        border-bottom: 1px solid #e2e8f0;
        position: sticky;
        top: 0;
        z-index: 100;
        -ms-overflow-style: none;
    }

    .admin-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
        font-weight: 600;
        white-space: nowrap;
        min-height: 48px;
        min-width: auto;
        flex-shrink: 0;
        border: none;
        background: transparent;
        color: #64748b;
        cursor: pointer;
        transition: all 0.2s ease;
        border-bottom: 3px solid transparent;
        position: relative;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

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

    .tab-btn.active {
        color: #2563eb;
        border-bottom-color: #2563eb;
        background: rgba(37, 99, 235, 0.05);
        font-weight: 700;
    }

    .admin-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .admin-section-header .btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .admin-table-container {
        padding: 0.5rem;
        border-radius: 12px;
    }

    .admin-table {
        font-size: 0.85rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.5rem;
    }

    .admin-table td:last-child {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .admin-table .btn-sm {
        width: 100%;
        padding: 0.6rem;
    }

    /* 이미지 미리보기 */
    #imagePreviewContainer {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .image-preview-item img {
        height: 120px;
    }

    /* 폼 그리드 */
    .form-group input[type="datetime-local"] {
        font-size: 1rem;
    }
    
    /* 폼 그리드 모바일 최적화 */
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    /* 인라인 그리드 스타일 모바일 오버라이드 */
    .modal-content div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* 차량 정보 섹션 모바일 최적화 */
    .modal-content h3 {
        font-size: 1.25rem;
        margin-top: 1.5rem;
        margin-bottom: 1rem;
    }
    
    /* 입력 필드 터치 영역 확대 */
    .form-group input,
    .form-group textarea,
    .form-group select {
        min-height: 48px;
        font-size: 16px; /* iOS 줌 방지 */
        padding: 0.875rem 1rem;
        -webkit-appearance: none;
        appearance: none;
        border-radius: 12px;
    }
    
    /* 체크박스 터치 영역 확대 */
    .option-checkbox-item {
        min-height: 40px;
        padding: 0.5rem 0.375rem;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .option-checkbox-item input[type="checkbox"] {
        width: 18px;
        height: 18px;
        min-width: 18px;
        min-height: 18px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        accent-color: var(--primary-color);
        -webkit-appearance: checkbox;
        appearance: checkbox;
    }
    
    .option-checkbox-item input[type="checkbox"]:checked {
        accent-color: var(--primary-color);
    }
    
    .option-checkbox-item span {
        font-size: 0.7rem;
        padding-left: 0.125rem;
    }
    
    /* 옵션 체크박스 그리드 모바일 최적화 */
    .options-checkbox-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.375rem;
        max-height: 50vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 0.5rem;
        border-radius: 12px;
    }
    
    /* 배지 체크박스 모바일 최적화 */
    .badge-checkbox-item {
        min-height: 48px;
        padding: 0.75rem;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .badge-checkbox-item input[type="checkbox"] {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
    }
    
    /* 배지 설정 라벨 모바일 최적화 */
    .modal-content label[for*="Badge"] {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        min-height: 48px;
        padding: 0.75rem;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        border-radius: 8px;
        transition: background 0.2s ease;
    }
    
    .modal-content label[for*="Badge"]:active {
        background: rgba(0, 0, 0, 0.05);
    }
    
    .modal-content label[for*="Badge"] input[type="checkbox"] {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
        margin: 0;
    }
    
    .modal-content label[for*="Badge"] span {
        font-size: 1rem;
        font-weight: 500;
    }
    
    /* 관리자 섹션 모바일 최적화 */
    .admin-section {
        padding: 1rem 0.875rem;
    }
    
    .admin-section .container {
        padding: 0 0.5rem;
        max-width: 100%;
    }
    
    .admin-section .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }
    
    /* 관리자 대시보드 모바일 최적화 */
    #adminDashboard {
        border-radius: 12px;
        overflow: hidden;
    }
    
    .admin-tab-content {
        padding: 1.5rem 1rem;
    }
    
    .admin-tab-content h3 {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
    }
    
    /* 통계 카드 모바일 최적화 */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    /* 이미지 미리보기 모바일 최적화 */
    #imagePreviewContainer,
    #editImagePreviewContainer {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0.5rem;
    }
    
    .image-preview-item {
        position: relative;
        min-height: 100px;
    }
    
    .image-preview-item img {
        width: 100%;
        height: 120px;
        object-fit: cover;
        border-radius: 8px;
    }
    
    .image-preview-item .remove-image-btn {
        min-width: 32px;
        min-height: 32px;
        width: 32px;
        height: 32px;
        padding: 0;
        font-size: 1rem;
    }
    
    /* 파일 업로드 버튼 모바일 최적화 */
    .file-upload-label {
        min-height: 48px;
        padding: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* 모달 내부 스크롤 최적화 */
    .modal-content form {
        max-height: calc(95vh - 100px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-right: 0.25rem;
    }
    
    /* 경매 생성/수정 모달 폼 스크롤 우선 적용 */
    #createAuctionModal .modal-content form,
    #editAuctionModal .modal-content form {
        max-height: none;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    /* 모달 버튼 그룹 모바일 최적화 */
    .modal-content .btn-group,
    .modal-content > div:last-child {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .modal-content .btn {
        width: 100%;
        min-height: 48px;
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }

    /* 카드 터치 피드백 */
    .auction-card,
    .stat-card,
    .auction-card-modern {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    /* 스크롤 최적화 */
    * {
        -webkit-overflow-scrolling: touch;
    }

    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* 상태바 높이는 navbar에만 적용 */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .nav-brand h1 {
        font-size: 1.1rem;
    }
    
    /* 터치 영역 최소 크기 확보 (최소 44x44px) */
    button,
    .btn,
    .nav-link,
    .bottom-nav-item,
    .auction-like-btn,
    .detail-back-btn,
    .detail-like-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* 모바일에서 텍스트 선택 허용 (필요한 경우) */
    input,
    textarea,
    .recommended-description,
    .auction-title-modern,
    .detail-title {
        -webkit-user-select: text;
        user-select: text;
    }
    
    /* 모바일 스크롤 성능 최적화 */
    .auctions-list,
    .detail-thumbnails,
    .options-checkbox-grid {
        will-change: scroll-position;
        contain: layout style paint;
        transform: translateZ(0); /* 하드웨어 가속 */
    }
    
    /* 경매 카드 렌더링 최적화 */
    .auction-card-modern {
        contain: layout style paint;
        transform: translateZ(0); /* 하드웨어 가속 */
    }
    
    /* 이미지 최적화 */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    
    /* 이미지 로딩 최적화 */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    /* iOS 줌 방지 */
    input,
    textarea,
    select {
        font-size: 16px;
    }

    /* 경매 카드 모던 스타일 모바일 */
    .auction-images-grid {
        height: 180px;
        padding: 0.375rem;
    }

    .auction-badges {
        padding: 0.5rem 0.75rem 0.375rem;
        gap: 0.375rem;
        overflow: visible;
        min-height: 1.75rem;
    }

    .auction-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .auction-title-modern {
        font-size: 1rem;
    }

    .auction-details {
        font-size: 0.8rem;
    }
    
    /* 경매 리스트 모바일 */
    .auctions-list {
        gap: 1.5rem;
        padding: 0 0.5rem;
        margin-bottom: 1rem;
    }
    
    /* WebView 호환성을 위한 추가 간격 설정 (모바일) */
    .auctions-list > * {
        margin-bottom: 1.5rem !important;
    }
    
    .auctions-list > *:last-child {
        margin-bottom: 0 !important;
    }
    
    /* 경매 카드 모던 스타일 모바일 */
    .auction-card-modern {
        margin-bottom: 1.5rem !important; /* WebView 호환성을 위한 !important */
    }

    /* 검색바 모바일 */
    .search-bar {
        padding: 0.625rem 0.875rem;
    }

    .search-input {
        font-size: 0.9rem;
    }

    /* 하단 네비게이션 바 모바일 */
    .bottom-nav {
        padding: 0.625rem 0;
    }

    .bottom-nav-item {
        padding: 0.375rem 0.5rem;
    }

    .bottom-nav-icon {
        width: 22px;
        height: 22px;
    }

    .bottom-nav-item span {
        font-size: 0.7rem;
    }

    /* MY 페이지 모바일 */
    .my-profile-section {
        padding: 1.5rem 0;
    }

    .profile-image {
        width: 80px;
        height: 80px;
    }

    .profile-name {
        font-size: 1.1rem;
    }

    .points-box {
        padding: 0.875rem 1rem;
    }

    .my-menu-item {
        padding: 1rem 1.25rem;
    }

    .menu-icon-wrapper {
        width: 36px;
        height: 36px;
    }

    .menu-icon {
        width: 20px;
        height: 20px;
    }

    .menu-icon-car {
        width: 28px;
        height: 28px;
    }

    .menu-text {
        font-size: 0.9rem;
    }

    /* 정렬 모달 모바일 */
    .sort-modal-content {
        max-height: 60vh;
        padding: 1.25rem;
    }

    .sort-option-item {
        padding: 1.25rem 0;
    }

    /* 경매 카드 모바일 */
    .auction-price-group {
        gap: 1rem;
    }

    .auction-price-value {
        font-size: 0.95rem;
    }

    .auction-price-label {
        font-size: 0.65rem;
    }

    .auction-actions {
        gap: 0.75rem;
    }
    
    .auction-bidder-count {
        font-size: 0.7rem;
    }
    
    .bidder-icon {
        width: 14px;
        height: 14px;
    }
    
    .detail-bidder-count {
        font-size: 0.8rem;
        margin-left: 0.25rem;
    }
    
    .bidder-icon-small {
        width: 14px;
        height: 14px;
    }

    /* 경매 상세 페이지 모바일 - 앱 스타일 최적화 */
    #auctionDetail {
        height: 100vh;
        height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); /* 입찰하기 버튼 높이 */
    }
    
    .auction-detail-header {
        padding: 0.625rem 0.875rem;
        padding-top: calc(0.625rem + env(safe-area-inset-top, 0px));
    }
    
    .auction-detail-header .nav-brand h1 {
        font-size: 1.1rem;
    }
    
    .detail-mobile-menu-toggle {
        display: flex;
    }
    
    .detail-nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        background: white;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 1.5rem;
        padding-top: calc(2rem + env(safe-area-inset-top, 0px));
        gap: 1.5rem;
        transition: right 0.3s ease;
        z-index: 200;
        overflow-y: auto;
    }
    
    .detail-nav-menu.active {
        right: 0;
    }
    
    .detail-nav-link {
        font-size: 1rem;
        width: 100%;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .detail-nav-link::after {
        display: none;
    }
    
    .detail-nav-user,
    .detail-nav-auth {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: auto;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .detail-nav-user button,
    .detail-nav-auth button {
        width: 100%;
    }
    
    .detail-nav-user span {
        font-size: 0.9rem;
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .detail-back-btn,
    .detail-like-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
    
    .detail-back-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .auction-detail-images {
        margin-top: calc(40px + env(safe-area-inset-top, 0px) + 0.625rem * 2);
    }
    
    .detail-main-image-container {
        height: 45vh;
        min-height: 280px;
        max-height: 450px;
        touch-action: pan-x pinch-zoom;
    }
    
    .image-slider-wrapper {
        touch-action: pan-x pinch-zoom;
    }
    
    .image-nav-btn {
        width: 36px;
        height: 36px;
        opacity: 0.7;
        min-width: 36px;
        min-height: 36px;
    }
    
    .image-nav-prev {
        left: 0.75rem;
    }
    
    .image-nav-next {
        right: 0.75rem;
    }
    
    .image-nav-btn svg {
        width: 18px;
        height: 18px;
    }

    .detail-thumbnails {
        padding: 0.625rem 0.875rem;
        gap: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    
    .detail-thumbnails::-webkit-scrollbar {
        display: none;
    }

    .detail-specs {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
        padding: 1rem 0.875rem;
    }
    
    .spec-item {
        padding: 0.75rem 0.875rem;
        border-radius: 10px;
    }
    
    .spec-label {
        font-size: 0.8125rem;
    }
    
    .spec-item span:not(.spec-label) {
        font-size: 0.875rem;
    }
    
    .spec-color-box {
        width: 20px;
        height: 20px;
    }

    .detail-thumbnail {
        width: 72px;
        height: 54px;
        min-width: 72px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .auction-detail-info {
        padding: 1.125rem 0.875rem;
    }

    .detail-price-group {
        gap: 1.25rem;
        flex-wrap: wrap;
    }

    .detail-price-value {
        font-size: 1.35rem;
    }

    .detail-price-label {
        font-size: 0.7rem;
    }

    .detail-title {
        font-size: 1.125rem;
        margin-bottom: 0.625rem;
    }

    .detail-specs {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
        padding: 1.125rem 0.875rem;
    }

    .detail-section {
        padding: 1.125rem 0.875rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }

    .detail-action-bar {
        position: fixed;
        bottom: 0;
        padding: 0.875rem 0.875rem;
        padding-bottom: calc(0.875rem + env(safe-area-inset-bottom, 0px));
        gap: 0.625rem;
        margin-bottom: 0;
    }

    .action-bar-right {
        flex: 1;
        min-width: 0;
    }

    .action-btn-primary {
        width: 100%;
        max-width: 100%;
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
        min-height: 48px;
    }
    
    /* 모바일 모달 최적화 */
    .modal-content {
        max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-top: calc(1.5rem + env(safe-area-inset-top) + 20px);
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom) + 20px);
    }
    
    .modal.show {
        align-items: flex-start;
        padding-top: env(safe-area-inset-top);
    }
    
    /* 상세 페이지 모달이 열릴 때 하단 네비게이션 바 숨기기 */
    #auctionModal.show ~ .bottom-nav,
    body:has(#auctionModal.show) .bottom-nav {
        display: none;
    }
    
    /* 모바일 하단 네비게이션 고정 */
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: white;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    }
    
    /* 모바일에서 컨텐츠가 하단 네비게이션에 가려지지 않도록 */
    main {
        padding-bottom: 80px;
        padding-top: calc(env(safe-area-inset-top) + 44px + 0.75rem * 2); /* 상태바 높이 + 네비게이션 바 높이 (패딩 포함) */
    }
    
    /* 모바일 네비게이션 바 - 상단 고정 (상태바 영역 포함) */
    .navbar {
        top: 0; /* 상단에 고정 */
        padding-top: calc(0.75rem + env(safe-area-inset-top)); /* 상태바 높이 + 패딩 */
    }
    
    /* 모바일 상태바 영역 흰색 배경 */
    .navbar::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: env(safe-area-inset-top);
        background: white;
        z-index: -1;
    }
    
    /* 모바일 html 상태바 영역 흰색 배경 */
    html {
        padding-top: env(safe-area-inset-top);
        background-color: white;
    }
    
    /* 경매 상세 모달 모바일 최적화 */
    #auctionModal .modal-content {
        max-height: 100vh;
        height: 100vh;
        height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border-radius: 0;
        padding: 0;
    }
    
    #auctionDetail {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        min-height: 0;
    }
    
    .auction-detail-info,
    .auction-detail-images,
    .detail-section {
        flex-shrink: 0;
    }
}

/* 매우 작은 화면 (320px 이하) */
@media (max-width: 320px) {
    .nav-brand h1 {
        font-size: 1.2rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 알림 */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #2563eb;
}

/* 로딩 */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--gray);
}

.spinner {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 관리자 페이지 스타일 */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 0.5rem 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.admin-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.tab-btn:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.05);
}

.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background: white;
    font-weight: 600;
}

/* 관리자 탭 콘텐츠 - 앱 스타일 */
.admin-tab-content {
    padding: 1.5rem 0;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-section-header h3 {
    margin: 0;
}

.admin-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: var(--light);
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid var(--border);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.admin-table tr:hover {
    background: var(--light);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.role-badge.admin {
    background: #dbeafe;
    color: #1e40af;
}

.role-badge.user {
    background: #f3f4f6;
    color: var(--gray);
}

.role-badge.dealer {
    background-color: #f59e0b;
    color: white;
}

/* 이미지 업로드 및 미리보기 */
.image-preview-item {
    position: relative;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--light);
}

.image-preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.image-preview-item button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    padding: 0;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#imagePreviewContainer {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

/* 이미지 확대 모달 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: auto;
    animation: fadeIn 0.3s ease;
}

.image-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.image-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.image-modal-nav {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 1rem;
}

.image-modal-prev,
.image-modal-next {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
    z-index: 10001;
}

.image-modal-prev:hover,
.image-modal-next:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.image-modal-prev svg,
.image-modal-next svg {
    width: 24px;
    height: 24px;
}

.image-modal-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 10001;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 색상 드롭다운 색상 박스 스타일 */
.color-box-container {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    vertical-align: middle;
}

.color-preview-box {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 색상 드롭다운이 있는 form-group 스타일 조정 */
.form-group:has(#carColor),
.form-group:has(#editCarColor) {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.form-group:has(#carColor) label,
.form-group:has(#editCarColor) label {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.form-group:has(#carColor) select,
.form-group:has(#editCarColor) select {
    flex: 1 1 auto;
    min-width: 200px;
}

@media (max-width: 768px) {
    .image-modal-content {
        padding: 1rem;
    }
    
    .image-modal-close {
        top: 0.5rem;
        right: 1rem;
        font-size: 2rem;
        width: 35px;
        height: 35px;
    }
    
    .image-modal-prev,
    .image-modal-next {
        width: 40px;
        height: 40px;
    }
    
    .image-modal-prev svg,
    .image-modal-next svg {
        width: 20px;
        height: 20px;
    }
    
    .image-modal-counter {
        bottom: 1rem;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

