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

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

header {
    text-align: center;
    padding: 2rem 1rem;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, padding, background;
}

header.minimized {
    padding: 0.5rem 0;
    background: rgba(102, 126, 234, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header.minimized h1 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

header.minimized p {
    display: none;
}

header.minimized nav {
    padding: 0.5rem 0;
}

header.minimized .nav-link {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
}

header.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.subtitle {
    font-size: 1rem !important;
    opacity: 0.8 !important;
    margin-bottom: 2rem !important;
}

.header-nav,
nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 0;
}

.nav-link {
    background: white;
    color: #667eea;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.nav-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    text-decoration: none;
}

.nav-link.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.category {
    margin-bottom: 4rem;
    scroll-margin-top: 120px;
}

.category h2 {
    text-align: center;
    color: white;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
}

.category h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-radius: 2px;
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.deal-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.deal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 300% 300%;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.deal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.deal-card h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 0.5rem;
}

.benefit {
    font-size: 1.1rem;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.detail {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.deal-link {
    display: inline-block;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.deal-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    text-decoration: none;
}

footer {
    text-align: center;
    padding: 3rem 1rem 2rem;
    color: white;
    margin-top: 2rem;
}

footer p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.note {
    font-size: 0.9rem !important;
    opacity: 0.8;
}

.community-info {
    font-size: 1rem !important;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

/* 스크롤 부드럽게 하기 */
html {
    scroll-behavior: smooth;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    header h1 {
        font-size: 30px;
    }
    
    header p {
        font-size: 1rem;
    }
    
    /* 모바일에서 햄버거 메뉴 숨기기 */
    .mobile-menu-toggle {
        display: none !important;
    }
    
    /* 기본 네비게이션 숨기기 */
    .header-nav,
    nav {
        display: none;
    }
    
    /* 모바일 카카오 버튼 최적화 */
    .kakao-links {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        padding: 1.5rem 1rem;
        margin: 1.5rem 0;
    }
    
    .kakao-link {
        width: 100%;
        max-width: 320px;
        padding: 1.2rem 1rem;
        font-size: 0.95rem;
        min-width: auto;
        margin: 0;
        border-radius: 15px;
    }
    
    .category h2 {
        font-size: 1.5rem;
    }
    
    .deals-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .category {
        scroll-margin-top: 100px;
    }

    /* Back to Top 버튼 위치 조정 - 모바일 네비와 겹치지 않도록 */
    .back-to-top {
        bottom: 25px;
        right: 25px;
        width: 55px;
        height: 55px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .deal-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    header {
        padding: 1rem 0.5rem;
    }

    .category {
        scroll-margin-top: 90px;
    }
    
    /* 초소형 모바일 카카오 버튼 */
    .kakao-links {
        padding: 1rem 0.5rem;
        gap: 0.8rem;
    }
    
    .kakao-link {
        width: 100%;
        max-width: 280px;
        padding: 1rem 0.8rem;
        font-size: 0.9rem;
        border-radius: 12px;
    }

    .deal-card h3 {
        font-size: 1.3rem;
    }
    
    .benefit {
        font-size: 1rem;
    }
    
    .detail {
        font-size: 0.9rem;
    }
    
    /* 초소형 모바일 Back to Top 버튼 */
    .back-to-top {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 1rem;
    }
}

/* 섹션별 다른 색상 테마 */
#all-food .deal-card::before {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
}

#all-other .deal-card::before {
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
}

#vic-food .deal-card::before {
    background: linear-gradient(45deg, #96ceb4, #feca57);
}

#vic-other .deal-card::before {
    background: linear-gradient(45deg, #a55eea, #fd79a8);
}

/* 로딩 애니메이션 */
.category {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* 호버 효과 개선 */
.deal-card:hover .deal-link {
    background: linear-gradient(45deg, #5a67d8, #667eea);
}

/* Back to top 버튼 기본 스타일 개선 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* 카카오톡 오픈채팅방 링크 스타일 */
.kakao-links {
    margin: 3rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.kakao-links h3 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    text-align: center;
    width: 100%;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.kakao-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #FEE500, #FFEB3B);
    color: #3C1E1E;
    text-decoration: none;
    padding: 1.2rem 2rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(254, 229, 0, 0.4);
    min-width: 240px;
    font-weight: bold;
    text-align: center;
    flex: 1;
    max-width: 300px;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.kakao-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
    }
    
.kakao-link:hover::before {
    left: 100%;
    }

.kakao-link:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(254, 229, 0, 0.6);
    text-decoration: none;
    color: #3C1E1E;
}

/* 모바일 터치 최적화 */
@media (hover: none) and (pointer: coarse) {
    .deal-card:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .deal-card:active {
        transform: scale(0.98);
    }
    
    .nav-link:hover {
        transform: none;
        background: white;
        color: #667eea;
    }
    
    .nav-link:active {
        transform: scale(0.95);
    }
}

/* 모바일 뷰포트 최적화 */
@viewport {
    width: device-width;
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* 대비 개선 */
@media (prefers-contrast: high) {
    .deal-card {
        border: 2px solid #333;
    }
    
    .nav-link {
        border: 2px solid currentColor;
    }
}

/* 다크모드 대응 */
@media (prefers-color-scheme: dark) {
    .deal-card {
        background: #f8f9fa;
        color: #333;
        border: 1px solid #dee2e6;
    }
    
    .deal-card h3 {
        color: #2c3e50;
        border-bottom-color: #dee2e6;
    }
    
    .benefit {
        color: #e74c3c;
    }
    
    .detail {
        color: #6c757d;
    }
}

/* 추가 모바일 최적화 */
@media (max-width: 480px) {
    /* 스크롤 성능 최적화 */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* 입력 확대 방지 */
    input, select, textarea {
        font-size: 16px;
    }
    
    /* 터치 타겟 크기 최적화 */
    .nav-link, .deal-link, .kakao-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* 텍스트 가독성 개선 */
    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    /* 메모리 최적화 */
    .deal-card {
        will-change: transform;
    }
    
    .deal-card:not(:hover) {
        will-change: auto;
    }
}

/* 초소형 디바이스 대응 */
@media (max-width: 320px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .deals-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .deal-card {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.65rem;
    }
    
    .kakao-btn {
        min-width: 220px;
        padding: 0.7rem 0.8rem;
    }
}

/* 대형 태블릿 최적화 */
@media (min-width: 768px) and (max-width: 1024px) {
    .deals-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .category h2 {
        font-size: 1.8rem;
    }
}

/* 푸터 스타일 */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 3rem 1rem 2rem;
    margin-top: 4rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.community-section {
    margin-bottom: 2rem;
}

.community-section h3 {
    color: #4ecdc4;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.community-section p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-size: 1rem;
}

.info-section {
    text-align: center;
    opacity: 0.8;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 2rem;
}

.info-section p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.info-section p:first-child {
    font-weight: bold;
    color: #4ecdc4;
    font-size: 1.1rem;
}

.info-section small {
    font-size: 0.9rem;
    opacity: 0.7;
    line-height: 1.5;
}

/* 모바일 푸터 */
@media (max-width: 768px) {
    footer {
        padding: 2rem 1rem 1.5rem;
    }
    
    .community-section {
        text-align: center;
    }
}

/* 네비게이션 활성화 스타일 개선 */
.nav-link.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 커뮤니티 섹션 PC/모바일 대응 */
.community-section h3 {
    color: #4ecdc4;
    margin-bottom: 1rem;
}

.community-section p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* PC에서는 가로 배치 */
.kakao-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.kakao-link {
    background: linear-gradient(45deg, #FEE500, #FFEB3B);
    color: #3C1E1E;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 220px;
    box-shadow: 0 4px 15px rgba(254, 229, 0, 0.3);
    display: inline-block;
}

.kakao-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(254, 229, 0, 0.5);
    text-decoration: none;
    color: #3C1E1E;
}

/* 햄버거 메뉴 스타일 */
.mobile-menu-toggle {
    display: none;
    background: white;
    border: none;
    border-radius: 8px;
    padding: 0.8rem;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hamburger span {
    width: 24px;
    height: 3px;
    background: #667eea;
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

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

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

.mobile-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: left 0.3s ease;
    z-index: 1000;
    padding: 6rem 2rem 2rem;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
}

.mobile-nav.active {
    left: 0;
}

.mobile-nav .nav-link {
    display: block;
    width: 100%;
    margin: 1rem 0;
    padding: 1rem 1.5rem;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    backdrop-filter: blur(10px);
}

.mobile-nav .nav-link:hover,
.mobile-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(5px);
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 모바일 우측 고정 네비게이션 */
.mobile-fixed-nav {
    position: fixed;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 8px;
}

.mobile-fixed-nav .nav-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 8px;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
    min-width: 55px;
    max-width: 65px;
    text-align: center;
    line-height: 1.1;
    word-break: keep-all;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-fixed-nav .nav-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.6);
}

.mobile-fixed-nav .nav-btn.active {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.6);
}

@media (max-width: 768px) {
    .mobile-fixed-nav {
        display: flex;
    }
}

@media (max-width: 480px) {
    .mobile-fixed-nav {
        right: 12px;
        top: 45%;
    }
    
    .mobile-fixed-nav .nav-btn {
        padding: 6px 4px;
        font-size: 0.65rem;
        min-width: 45px;
        max-width: 50px;
        gap: 6px;
    }
} 