/* 기본 스타일 초기화 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #222;
    background-color: #f2f2f2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 헤더 스타일 */
header {
    background-color: #000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
}

.logo img {
    height: 45px;
    width: auto;
}

.header-right {
    display: flex;
    align-items: center;
}

#app-download-btn {
    padding: 8px 16px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#app-download-btn:hover {
    background-color: #555;
}

/* 검색 섹션 스타일 */
.search-section {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.search-container {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
}

#search-input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 15px;
    background-color: #fff;
    color: #222;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#search-button {
    padding: 12px 20px;
    background-color: #000;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.3s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#search-button:hover {
    background-color: #222;
}

/* 메인 콘텐츠 스타일 */
main {
    padding: 20px 0 40px;
}

.intro-section {
    text-align: center;
    padding: 30px 0;
    margin-bottom: 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.intro-section h1 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #111;
}

.intro-section p {
    font-size: 16px;
    color: #444;
    margin-bottom: 20px;
}

.app-download {
    margin-top: 25px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 8px;
    display: inline-block;
}

/* 필터 스타일 */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: flex-end;
}

.filters select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    color: #222;
}

/* 콘텐츠 그리드 스타일 */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* 플립 카드 스타일 */
.card {
    perspective: 1000px;
    aspect-ratio: 9/16;
    cursor: pointer;
    position: relative;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-front {
    background-color: #000;
}

.card-back {
    background-color: #fff;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    text-align: left;
}

.card-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-title {
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 18px;
    color: #111;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.card-price {
    color: #111;
    font-weight: 700;
    font-size: 16px;
}

.card-date {
    font-size: 13px;
    color: #777;
    margin-bottom: 15px;
    text-align: left;
}

.card-description {
    font-size: 14px;
    line-height: 1.5;
    overflow-y: auto;
    flex-grow: 1;
    margin-bottom: 20px;
    color: #333;
    text-align: left;
}

.card-action {
    margin-top: auto;
    width: 100%;
}

.card-button {
    width: 100%;
    padding: 12px 15px;
    background-color: #000;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.card-button:hover {
    background-color: #333;
}

.flip-hint {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 4px;
    opacity: 0.9;
}

/* 로딩 인디케이터 스타일 */
.loading {
    display: none;
    text-align: center;
    padding: 30px 0;
    margin: 20px 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.loading.visible {
    display: block;
    opacity: 1;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 12px;
}

.loading p {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 더 보기 버튼 스타일 */
.load-more {
    text-align: center;
    margin-top: 20px;
}

#load-more-btn {
    padding: 10px 25px;
    background-color: white;
    color: #000;
    border: 1px solid #000;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

#load-more-btn:hover {
    background-color: #000;
    color: white;
}

/* 푸터 스타일 */
footer {
    background-color: #000;
    color: #fff;
    padding: 30px 0;
    margin-top: 50px;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 200;
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    max-width: 800px;
    width: 90%;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.3);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background-color 0.3s;
}

.close-modal:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

#modal-content-container {
    padding: 30px;
}

.modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: #111;
}

.modal-description {
    margin-bottom: 20px;
    line-height: 1.7;
    color: #333;
}

.modal-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    color: #777;
    font-size: 14px;
    margin-bottom: 15px;
}

.modal-meta span {
    margin-right: 15px;
    margin-bottom: 5px;
}

.modal-price {
    font-size: 18px;
    color: #111;
    font-weight: 700;
    margin-bottom: 15px;
}

.app-promo {
    background-color: #f5f5f5;
    padding: 20px;
    text-align: center;
    border-radius: 0 0 8px 8px;
}

.app-install-btn {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #000;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.app-install-btn:hover {
    background-color: #333;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: #666;
}

.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    background: #f8d7da;
    border-radius: 8px;
    color: #721c24;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    header .container {
        padding: 10px 15px;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    footer .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 20px;
    }
    
    #search-input {
        padding: 10px;
    }
    
    #search-button {
        padding: 10px 15px;
    }
    
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .intro-section h1 {
        font-size: 24px;
    }
}

/* 앱 설치 다이얼로그 스타일 */
.dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 300;
    align-items: center;
    justify-content: center;
}

.dialog-content {
    background-color: white;
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    padding: 30px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.close-dialog {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    transition: color 0.3s;
}

.close-dialog:hover {
    color: #333;
}

.dialog h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #000;
}

.dialog p {
    margin-bottom: 25px;
    color: #444;
}

.dialog-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.dialog-buttons button {
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

#cancel-install {
    background-color: #eee;
    color: #333;
}

#cancel-install:hover {
    background-color: #ddd;
}

#confirm-install {
    background-color: #000;
    color: white;
}

#confirm-install:hover {
    background-color: #333;
}

/* 스크롤 업 버튼 스타일 */
.scroll-top-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #000;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scroll-top-button.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-button:hover {
    background-color: #333;
    transform: translateY(-3px);
}

.scroll-top-button::after {
    content: '↑';
    font-size: 20px;
    font-weight: bold;
} 