/* 기본 리셋 및 변수 설정 - 테트리스 게임 색상 적용 */
:root {
    --primary-color: #4a6fa5;
    --secondary-color: #5b7c99;
    --dark-color: #2c3e50;
    --darker-color: #34495e;
    --medium-color: #3f5877;
    --light-color: #ecf0f1;
    --text-color: #2c3e50;
    --text-light: #ffffff;
    --border-color: #bdc3c7;
    --shadow: 0 2px 10px rgba(0,0,0,0.3);
    --gradient-bg: linear-gradient(135deg, #2c3e50 0%, #34495e 25%, #3f5877 50%, #4a6fa5 75%, #5b7c99 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background: var(--gradient-bg);
    background-attachment: fixed;
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

.main-header,
.product-card,
.review-card,
.partner-banner,
.main-footer {
    backdrop-filter: blur(10px);
}

a,
button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 헤더 스타일 */
.main-header {
    background-color: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-title {
    font-size: 2rem;
    color: var(--secondary-color);
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: bold;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.main-nav a:hover {
    color: var(--secondary-color);
}

/* 드롭다운 메뉴 - 버그 수정 */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(44, 62, 80, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    display: none;
    min-width: 200px;
    padding: 0.5rem 0;
    border-radius: 8px;
    margin-top: 0.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s;
}

/* 호버 시에만 드롭다운 표시 */
.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1.5rem;
    color: var(--text-light);
    transition: background-color 0.3s;
}

.dropdown-menu a:hover {
    background-color: rgba(74, 111, 165, 0.3);
}

/* 히어로 섹션 */
.hero-section {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
}

.search-box input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
}

.search-box button {
    padding: 1rem 2rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(91, 124, 153, 0.4);
}

.search-box button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 124, 153, 0.6);
}

/* 섹션 기본 스타일 */
section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-light);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* 상품 그리드 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.stars {
    color: #f39c12;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.coupang-link {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 0.8rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(91, 124, 153, 0.4);
}

.coupang-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(91, 124, 153, 0.6);
}

/* 리뷰 리스트 */
.review-list {
    display: grid;
    gap: 1.5rem;
}

.review-card {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.review-card h3 {
    margin-bottom: 1rem;
}

.review-card h3 a {
    color: var(--dark-color);
    text-decoration: none;
}

.review-card h3 a:hover {
    color: var(--primary-color);
}

.review-excerpt {
    color: #555;
    margin-bottom: 1rem;
}

.review-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #777;
}

/* 카테고리 탭 */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-button {
    padding: 0.8rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--dark-color);
    font-weight: 500;
}

.tab-button.active,
.tab-button:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(91, 124, 153, 0.4);
}

/* 파트너 배너 */
.partner-banner {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* 관리자 버튼 (로그인 상태에서만 표시) */
.admin-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s;
}

.admin-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* 푸터 */
.main-footer {
    background-color: rgba(44, 62, 80, 0.95);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    backdrop-filter: blur(10px);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(189, 195, 199, 0.3);
    color: #95a5a6;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav ul {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0.75rem;
        overflow-x: auto;
        padding: 0.25rem 0 0.75rem;
        scrollbar-width: none;
    }

    .main-nav ul::-webkit-scrollbar {
        display: none;
    }

    .main-nav li {
        flex: 0 0 auto;
    }
    
    .dropdown-menu {
        position: static;
        display: none;
        margin-top: 0.5rem;
        background-color: rgba(52, 73, 94, 0.95);
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .category-tabs {
        flex-wrap: wrap;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 600px) {
    body {
        background-attachment: scroll;
    }

    .container {
        padding: 0 16px;
    }

    .site-title {
        font-size: 1.6rem;
    }

    .hero-section {
        padding: 2.5rem 1.5rem;
        margin-bottom: 2rem;
        border-radius: 12px;
    }

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

    .hero-content p {
        font-size: 1rem;
    }

    .search-box input,
    .search-box button {
        padding: 0.9rem 1.2rem;
        font-size: 0.95rem;
    }

    .product-card {
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    }

    .product-image {
        height: 180px;
    }

    .product-info {
        padding: 1.2rem;
    }

    .product-title {
        font-size: 1rem;
    }

    .product-price {
        font-size: 1.1rem;
    }

    .coupang-link {
        padding: 0.85rem;
        font-size: 0.95rem;
    }

    .review-card {
        padding: 1.5rem;
    }

    .review-meta {
        flex-wrap: wrap;
    }

    .admin-button {
        width: 52px;
        height: 52px;
        padding: 0.75rem;
        bottom: 16px;
        right: 16px;
    }
}

@media (max-width: 420px) {
    .hero-section {
        padding: 2rem 1.2rem;
    }

    .search-box {
        gap: 0.75rem;
    }

    .product-image {
        height: 160px;
    }
}
