/* 기본 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 기본 스타일 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   헤더 스타일
   ============================================ */
.main-header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

/* 로고 섹션 */
.logo-section {
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #333;
    font-size: 1.5rem;
    font-weight: 700;
    transition: opacity 0.3s;
}

.logo:hover {
    opacity: 0.8;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 검색 섹션 */
.search-section {
    flex: 1;
    max-width: 500px;
    margin: 0 auto;
}

.search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1.25rem;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
    background: #f8f9fa;
}

.search-input:focus {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    background: transparent;
    border: none;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.search-btn:hover {
    opacity: 0.7;
}

.search-icon {
    color: #999;
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* 네비게이션 메뉴 */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #667eea;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #667eea;
    border-radius: 2px;
}

/* 헤더 액션 버튼들 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.btn-upload,
.btn-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-upload {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-login {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e5e5e5;
}

.btn-login:hover {
    background: #e9ecef;
    border-color: #667eea;
    color: #667eea;
}

.btn-icon {
    font-size: 1.1rem;
}

/* 모바일 메뉴 토글 버튼 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    justify-content: center;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s;
}

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

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

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

/* 모바일 메뉴 */
.mobile-menu {
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-menu.active {
    max-height: 500px;
}

.mobile-nav {
    padding: 1rem 0;
    border-top: 1px solid #e5e5e5;
}

.mobile-nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s;
}

.mobile-nav-link:hover {
    background: #f8f9fa;
    color: #667eea;
}

/* ============================================
   반응형 디자인
   ============================================ */
@media (max-width: 1024px) {
    .search-section {
        max-width: 400px;
    }

    .nav-menu {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .main-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: #ffffff;
    }

    .header-wrapper {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .logo-section {
        order: 1;
        flex: 0 0 auto;
    }

    .header-actions {
        order: 1;
        flex: 0 0 auto;
        margin-left: auto;
    }

    .search-section {
        order: 2;
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu {
        display: block;
        width: 100%;
    }

    .btn-upload .btn-text,
    .btn-login .btn-text {
        display: none;
    }

    .btn-upload,
    .btn-login {
        padding: 0.65rem;
        min-width: 2.5rem;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .header-actions {
        gap: 0.5rem;
    }
}

/* ============================================
   히어로 섹션
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 5rem 0;
    text-align: center;
    color: white;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.95;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

.popular-tags {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tags-label {
    font-weight: 500;
    opacity: 0.9;
}

.tag-list {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.tag:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ============================================
   필터 바
   ============================================ */
.filter-bar-section {
    background: white;
    border-bottom: 1px solid #e5e5e5;
    padding: 1.5rem 0;
    position: static !important;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.filter-select {
    padding: 0.6rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
}

.filter-select:hover {
    border-color: #667eea;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-reset {
    padding: 0.6rem 1.25rem;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: auto;
}

.filter-reset:hover {
    background: #e9ecef;
    border-color: #667eea;
    color: #667eea;
}

/* ============================================
   섹션 공통 스타일
   ============================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
}

.section-header-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.section-description {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

.view-all-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.category-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.category-filter-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.category-select {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #ffffff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
    min-width: 200px;
}

.category-select:hover {
    border-color: #667eea;
}

.category-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .category-filter {
        margin-left: 0;
        width: 100%;
    }

    .category-filter-label {
        font-size: 0.9rem;
    }

    .category-select {
        min-width: 0;
        flex: 1;
        width: 100%;
    }
}

.view-all-link:hover {
    color: #5a67d8;
}

/* ============================================
   배경화면 그리드
   ============================================ */
.wallpaper-section,
.latest-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.wallpaper-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    cursor: pointer;
}

.wallpaper-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.wallpaper-image {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.wallpaper-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* 썸네일 이미지 최적화: 확대 시 부드러운 렌더링 */
    image-rendering: auto;
    /* 브라우저 최적화 힌트 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.wallpaper-card:hover .image-overlay {
    opacity: 1;
}

.btn-preview,
.btn-download {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.btn-preview {
    background: white;
    color: #333;
}

.btn-preview:hover {
    background: #f8f9fa;
}

.btn-download {
    background: #667eea;
    color: white;
}

.btn-download:hover {
    background: #5a67d8;
    transform: scale(1.05);
}

.wallpaper-info {
    padding: 1.25rem;
}

.wallpaper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.wallpaper-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wallpaper-stats {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
    align-items: center;
}

.wallpaper-stats .stat {
    font-size: 0.85rem;
    color: #666;
}

/* 좋아요 버튼 스타일 */
.btn-like {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    color: #666;
    font-family: inherit;
}

.btn-like:hover {
    background: #f5f5f5;
    transform: scale(1.05);
}

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

.btn-like.liked {
    color: #e74c3c;
}

.btn-like.liked:hover {
    background: #fee;
}

.like-icon {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.btn-like:hover .like-icon {
    transform: scale(1.2);
}

.like-count {
    font-weight: 600;
    min-width: 1.5rem;
    text-align: center;
}

/* ============================================
   카테고리 섹션
   ============================================ */
.categories-section {
    padding: 4rem 0;
    background: white;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
}

.category-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: transform 0.5s;
}

.category-card:hover::before {
    transform: rotate(45deg) translate(50%, 50%);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.category-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}

.category-description {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    position: relative;
    z-index: 2;
}

.category-count {
    font-size: 0.9rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

/* ============================================
   기능 섹션
   ============================================ */
.features-section {
    padding: 4rem 0;
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.feature-description {
    color: #666;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .features-section {
        padding: 2rem 0;
    }

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

    .feature-card {
        padding: 1rem;
    }

    .feature-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .feature-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .feature-description {
        font-size: 0.85rem;
    }
}

/* ============================================
   푸터
   ============================================ */
.main-footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1.5rem;
}

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

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #667eea;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #667eea;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
    font-size: 0.9rem;
}

/* ============================================
   모달
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.modal-content {
    background: white;
    border-radius: 12px;
    position: relative;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
}

.modal-large {
    max-width: 900px;
}

.modal-medium {
    max-width: 600px;
    width: 90%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e5e5;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    z-index: 10;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    line-height: 1;
    font-weight: 300;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e5e5;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.modal-body {
    padding: 2rem;
}

.modal-body img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    justify-content: center;
}

.btn-download-large {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-download-large:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-download-large:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #ccc;
}

/* ============================================
   반응형 추가
   ============================================ */
@media (max-width: 768px) {
    .hero-section {
        padding: 2.5rem 0;
    }

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

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .hero-stats {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

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

    .stat-label {
        font-size: 0.85rem;
    }

    .popular-tags {
        gap: 0.5rem;
    }

    .tags-label {
        font-size: 0.85rem;
    }

    .tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    .filter-reset {
        margin-left: 0;
        width: 100%;
    }

    .section-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-header-content {
        flex: 1;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-description {
        font-size: 0.9rem;
    }
    
    .view-all-link {
        white-space: nowrap;
        flex-shrink: 0;
        margin-top: 0.25rem;
    }

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

    .wallpaper-image {
        height: 350px;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

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

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

    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .hero-stats {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .stat-number {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .popular-tags {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .tags-label {
        font-size: 0.8rem;
    }

    .tag-list {
        gap: 0.5rem;
    }

    .tag {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
    }

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

    .wallpaper-image {
        height: 300px;
    }

    .image-overlay {
        flex-direction: column;
    }
}

/* ============================================
   광고 영역 스타일
   ============================================ */
.ad-container {
    background: #f8f9fa;
    padding: 2rem 0;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.ad-container.ad-top {
    background: white;
    padding: 1.5rem 0;
}

.ad-container.ad-section {
    background: #f8f9fa;
    margin: 2rem 0;
}

.ad-container.ad-bottom {
    background: white;
    padding: 1.5rem 0;
}

.ad-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90px;
    width: 100%;
}

.ad-placeholder {
    background: #e9ecef;
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder p {
    margin: 0;
}

/* 인라인 광고 (그리드 내부) */
.ad-inline {
    grid-column: 1 / -1;
    margin: 1rem 0;
}

.ad-inline .ad-wrapper {
    min-height: 250px;
}

.ad-inline .ad-placeholder {
    max-width: 336px;
    min-height: 280px;
    margin: 0 auto;
}

/* 반응형 광고 */
@media (max-width: 768px) {
    .ad-container {
        padding: 1.5rem 0;
    }

    .ad-wrapper {
        min-height: 50px;
    }

    .ad-placeholder {
        min-height: 50px;
        padding: 1rem;
        font-size: 0.8rem;
    }

    .ad-inline .ad-wrapper {
        min-height: 200px;
    }

    .ad-inline .ad-placeholder {
        min-height: 200px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .ad-container {
        padding: 1rem 0;
    }

    .ad-placeholder {
        padding: 0.75rem;
        font-size: 0.75rem;
    }
}

/* ============================================
   업로드 페이지 스타일
   ============================================ */
.upload-section {
    padding: 3rem 0;
    background: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.upload-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.upload-header {
    text-align: center;
    margin-bottom: 3rem;
}

.upload-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.75rem;
}

.upload-subtitle {
    font-size: 1.1rem;
    color: #666;
}

/* 업로드 폼 */
.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 업로드 영역 */
.upload-area {
    border: 2px dashed #e5e5e5;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-area.drag-over {
    border-color: #667eea;
    background: #e8edff;
    transform: scale(1.02);
}

.upload-area.validation-error {
    border-color: #ff4757;
    background: #fff5f5;
}

.upload-area.validation-error:hover {
    border-color: #ff4757;
    background: #ffe5e5;
}

.upload-area-content {
    width: 100%;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.upload-area-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.upload-area-subtitle {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.btn-select-file {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-select-file:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 업로드 미리보기 */
.upload-preview {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.upload-preview img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    max-height: 400px;
    object-fit: contain;
}

/* 검증 메시지 */
.validation-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fff5f5;
    border: 1px solid #ff4757;
    border-radius: 8px;
    color: #ff4757;
    font-size: 0.9rem;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

.validation-icon {
    font-size: 1.1rem;
}

.validation-text {
    font-weight: 500;
}

/* 해상도 배지 (업로드 영역에만 적용) */
.upload-area .resolution-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.resolution-badge span {
    letter-spacing: 0.5px;
}

.btn-remove-preview {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 2.5rem;
    height: 2.5rem;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-remove-preview:hover {
    background: #ff3838;
    transform: scale(1.1);
}

/* 폼 그룹 */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.form-label .required {
    color: #ff4757;
}

.form-input,
.form-select,
.form-textarea {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: 0.9rem;
    color: #777;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
}

/* 업로드 중 오버레이 */
.upload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.upload-loading {
    background: white;
    padding: 3rem 4rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    min-width: 250px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* 알림 메시지 */
.alert {
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #f0fdf4;
    border-color: #a3e635;
    color: #166534;
}

.alert-error {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

/* 폼 액션 버튼 */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e5e5;
}

.btn-cancel {
    padding: 0.75rem 2rem;
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancel:hover {
    background: #e9ecef;
    border-color: #667eea;
    color: #667eea;
}

.btn-submit {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 150px;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 업로드 버튼 링크 스타일 */
.btn-upload {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
    text-decoration: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ============================================
   페이지네이션 스타일
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pagination-link:hover:not(.disabled):not(.active) {
    background: #f5f5f5;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.pagination-link.active {
    background: #667eea;
    border-color: #667eea;
    color: #ffffff;
    font-weight: 600;
}

.pagination-link.disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

/* 검색 정보 */
.search-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-hint {
    color: #999;
    font-size: 0.9rem;
}

.search-count {
    font-size: 0.9rem;
    color: #666;
}

@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    
    .pagination-link {
        min-width: 35px;
        height: 35px;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* 반응형 업로드 페이지 */
@media (max-width: 768px) {
    .upload-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .upload-title {
        font-size: 2rem;
    }

    .upload-area {
        padding: 2rem 1rem;
        min-height: 250px;
    }

    .upload-icon {
        font-size: 3rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-submit {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .upload-container {
        padding: 1.5rem 1rem;
    }

    .upload-title {
        font-size: 1.75rem;
    }

    .upload-area {
        padding: 1.5rem 0.5rem;
    }
}
