/* App Review Plugin - Frontend Styles (Simple Design with Buttons in Header) */

/* ============================================
   기본 컨테이너 - 심플 디자인
============================================ */

.app-review-container {
    max-width: 1200px;
    margin: 30px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    border: 1px solid #e8e8e8;
}

/* 헤더 섹션 - 3단 레이아웃: 아이콘 | 앱정보 | 버튼 */
.app-review-header {
    padding: 30px;
    display: flex;
    gap: 24px;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.app-icon-wrapper {
    flex-shrink: 0;
}

.app-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
}

.app-info {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-name {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.app-category {
    font-size: 15px;
    color: #00a86b;
    font-weight: 600;
    margin-bottom: 0;
    display: inline-block;
    padding: 4px 12px;
    background: #e8f5f0;
    border-radius: 6px;
    width: fit-content;
}

/* 다운로드 버튼 섹션 - 헤더 안에 있음 */
.app-review-header .app-download-buttons {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 120px;
    justify-content: center;
    align-items: stretch;
}

.app-review-header .app-download-buttons .download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 32px;
    background: #00a86b;
    color: white !important;
    text-decoration: none;
    border-radius: 8px !important;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 168, 107, 0.2);
    border: none !important;
    min-width: 250px;
    white-space: nowrap;
}

.app-review-header .app-download-buttons .download-btn:hover {
    background: #008c5a;
    box-shadow: 0 2px 6px rgba(0, 168, 107, 0.3);
    transform: translateY(-1px);
    color: white !important;
}

.app-review-header .app-download-buttons .download-btn.appstore {
    background: #000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.app-review-header .app-download-buttons .download-btn.appstore:hover {
    background: #1a1a1a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.app-review-header .app-download-buttons .btn-icon {
    font-size: 20px;
    line-height: 1;
}

.app-review-header .app-download-buttons .btn-text {
    font-size: 16px;
    font-weight: 600;
}

/* 앱 정보 섹션 */
.app-description {
    padding: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.description-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px 0;
}

.description-text {
    font-size: 15px;
    line-height: 1.7;
    color: #4a4a4a;
    margin: 0;
    white-space: pre-wrap;
}

/* 반응형 디자인 */
@media (max-width: 992px) {
    .app-review-header .app-download-buttons {
        min-width: 200px;
    }
    
    .app-review-header .app-download-buttons .download-btn {
        min-width: 200px;
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .app-review-container {
        margin: 20px 0;  /* 좌우 여백 제거 */
        border-radius: 0;  /* 모바일에서는 모서리도 각지게 */
    }
    
    .app-review-header {
        padding: 20px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .app-icon {
        width: 100px;
        height: 100px;
        border-radius: 20px;
    }
    
    .app-info {
        align-items: center;
    }
    
    .app-name {
        font-size: 22px;
    }
    
    .app-review-header .app-download-buttons {
        width: 100%;
        height: auto;
    }
    
    .app-review-header .app-download-buttons .download-btn {
        width: 100%;
        min-width: 100%;
    }
    
    .app-description {
        padding: 20px;
    }
}

/* ============================================
   상세 페이지 스타일 - 심플 디자인
============================================ */

.app-detail-container {
    max-width: 1200px;
    margin: 30px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    border: 1px solid #e8e8e8;
}

/* 헤더 섹션 - 심플 */
.app-detail-header {
    padding: 40px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.app-header-left {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex: 1;
}

.app-detail-icon {
    width: 140px;
    height: 140px;
    border-radius: 28px;
    object-fit: cover;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
}

.app-header-info {
    flex: 1;
}

.app-detail-name {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.2;
    color: #1a1a1a;
}

.app-developer {
    font-size: 16px;
    margin-bottom: 8px;
    color: #666;
}

.developer-link {
    color: #00a86b;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.developer-link:hover {
    border-bottom-color: #00a86b;
}

.app-detail-category {
    display: inline-block;
    padding: 6px 14px;
    background: #f0f9f5;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #00a86b;
}

.app-header-right {
    flex-shrink: 0;
}

.app-detail-download-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-detail-header .app-detail-download-buttons .detail-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: #00a86b;
    color: white !important;
    text-decoration: none;
    border-radius: 8px !important;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 168, 107, 0.2);
    min-width: 200px;
    justify-content: center;
    border: none !important;
}

.app-detail-header .app-detail-download-buttons .detail-download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 168, 107, 0.3);
    background: #008c5a;
    color: white !important;
}

.app-detail-header .app-detail-download-buttons .detail-download-btn.appstore {
    background: #000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.app-detail-header .app-detail-download-buttons .detail-download-btn.appstore:hover {
    background: #1a1a1a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    color: white !important;
}

/* 정보 카드 - 심플 (평점/리뷰만 표시) */
.app-info-cards {
    display: flex;
    justify-content: center;
    gap: 1px;
    background: #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    padding: 0;
}

.info-card {
    text-align: center;
    padding: 24px 60px;
    background: #fff;
    min-width: 200px;
}

.info-card-value {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.info-card-label {
    font-size: 13px;
    color: #888;
}

/* 섹션 공통 스타일 - 심플 */
.app-screenshots-section,
.app-about-section,
.app-whats-new-section,
.app-ratings-section,
.app-developer-section,
.app-additional-info {
    padding: 40px;
    border-bottom: 1px solid #f0f0f0;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 24px 0;
}

/* 스크린샷 갤러리 */
.screenshots-gallery {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: #d0d0d0 #f8f8f8;
}

.screenshots-gallery::-webkit-scrollbar {
    height: 8px;
}

.screenshots-gallery::-webkit-scrollbar-track {
    background: #f8f8f8;
    border-radius: 4px;
}

.screenshots-gallery::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 4px;
}

.screenshots-gallery::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

.screenshot-item {
    flex-shrink: 0;
}

.screenshot-image {
    height: 380px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    border: 1px solid #f0f0f0;
}

.screenshot-image:hover {
    transform: scale(1.02);
}

/* 앱 정보 */
.about-content p {
    font-size: 15px;
    line-height: 1.7;
    color: #4a4a4a;
    margin: 0;
    white-space: pre-wrap;
}

/* 새로운 기능 */
.update-date {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

.whats-new-content p {
    font-size: 15px;
    line-height: 1.7;
    color: #4a4a4a;
    margin: 0;
    white-space: pre-wrap;
}

/* 평가 및 리뷰 - 심플 */
.ratings-overview {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 40px;
    align-items: center;
}

.ratings-average {
    text-align: center;
}

.average-score {
    font-size: 56px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: 8px;
}

.average-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}

.star {
    color: #00a86b;
    font-size: 18px;
}

.star.half {
    position: relative;
    color: #e0e0e0;
}

.star.half::before {
    content: "★";
    position: absolute;
    left: 0;
    color: #00a86b;
    width: 50%;
    overflow: hidden;
}

.star.empty {
    color: #e0e0e0;
}

.average-total {
    font-size: 14px;
    color: #888;
}

.ratings-distribution {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rating-label {
    font-size: 13px;
    color: #888;
    width: 30px;
}

.rating-bar {
    flex: 1;
    height: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: #00a86b;
    transition: width 0.5s ease;
}

.rating-count {
    font-size: 13px;
    color: #888;
    min-width: 50px;
    text-align: right;
}

/* 개발자 정보 - 심플 */
.developer-info {
    background: #f8f8f8;
    padding: 24px;
    border-radius: 8px;
}

.developer-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
}

.developer-row:last-child {
    border-bottom: none;
}

.developer-label {
    font-size: 14px;
    color: #888;
    min-width: 100px;
    font-weight: 500;
}

.developer-value {
    font-size: 14px;
    color: #1a1a1a;
}

.developer-value.developer-link {
    color: #00a86b;
    text-decoration: none;
}

.developer-value.developer-link:hover {
    text-decoration: underline;
}

/* 추가 정보 */
.additional-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-label {
    font-size: 13px;
    color: #888;
    font-weight: 500;
}

.info-value {
    font-size: 15px;
    color: #1a1a1a;
    font-weight: 600;
}

/* 반응형 디자인 - 상세 페이지 */
@media (max-width: 992px) {
    .ratings-overview {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .screenshot-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .app-detail-container {
        margin: 20px 0;  /* 좌우 여백 제거 */
        border-radius: 0;  /* 모바일에서는 모서리도 각지게 */
    }
    
    .app-detail-header {
        flex-direction: column;
        padding: 24px;
    }
    
    .app-header-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    .app-detail-icon {
        width: 120px;
        height: 120px;
        border-radius: 24px;
    }
    
    .app-detail-name {
        font-size: 26px;
    }
    
    .app-header-right {
        width: 100%;
    }
    
    .app-detail-download-buttons {
        width: 100%;
    }
    
    .app-detail-header .app-detail-download-buttons .detail-download-btn {
        width: 100%;
    }
    
    .app-info-cards {
        justify-content: center;
    }
    
    .info-card {
        padding: 20px 40px;
        width: 100%;
        max-width: 300px;
    }
    
    .app-screenshots-section,
    .app-about-section,
    .app-whats-new-section,
    .app-ratings-section,
    .app-developer-section,
    .app-additional-info {
        padding: 24px 20px;
    }
    
    .screenshot-image {
        height: 250px;
    }
    
    .additional-info-grid {
        grid-template-columns: 1fr;
    }
}

/* 에러 메시지 */
.app-review-error {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    color: #856404;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}
