/* === App Review Frontend Styles === */

:root {
    --ar-primary: #00C853;
    --ar-primary-dark: #00897B;
    --ar-text: #1a1a2e;
    --ar-text-light: #666;
    --ar-bg: #f5f5f5;
    --ar-card-bg: #fff;
    --ar-border: #e0e0e0;
    --ar-star-color: #FFB300;
    --ar-star-empty: #ccc;
    --ar-radius: 12px;
}

/* Container */
.ar-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ar-text);
    line-height: 1.6;
}

.ar-container h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: var(--ar-text);
}

/* Header */
.ar-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--ar-card-bg);
    border-radius: var(--ar-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.ar-app-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    object-fit: cover;
    flex-shrink: 0;
}

.ar-header-info {
    flex: 1;
    min-width: 0;
}

.ar-app-name {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 6px 0;
    line-height: 1.2;
}

.ar-rating-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ar-rating-number {
    font-size: 16px;
    font-weight: 600;
    color: var(--ar-text-light);
}

/* Stars */
.ar-stars {
    display: inline-flex;
    gap: 2px;
}

.ar-stars .star {
    font-size: 18px;
    line-height: 1;
}

.ar-stars .star.full {
    color: var(--ar-star-color);
}

.ar-stars .star.half {
    color: var(--ar-star-color);
    opacity: 0.6;
}

.ar-stars .star.empty {
    color: var(--ar-star-empty);
}

/* Ad Block */
.ar-ad-block {
    margin: 20px 0;
    text-align: center;
}

/* About Section (table format) */
.ar-about {
    background: var(--ar-card-bg);
    border-radius: var(--ar-radius);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.ar-about-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--ar-border);
    border-radius: 8px;
    overflow: hidden;
}

.ar-about-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ar-border);
    border-right: 1px solid var(--ar-border);
    background: var(--ar-card-bg);
}

.ar-about-cell:nth-child(2n) {
    border-right: none;
}

.ar-about-cell:nth-last-child(-n+2) {
    border-bottom: none;
}

/* Handle odd number of cells - last cell alone */
.ar-about-cell:nth-last-child(1):nth-child(odd) {
    border-right: none;
}

.ar-about-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ar-bg);
    border-radius: 8px;
}

.ar-about-cell-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.ar-about-label {
    font-size: 12px;
    color: var(--ar-text-light);
}

.ar-about-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--ar-text);
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ar-about-value a {
    color: var(--ar-primary-dark);
    text-decoration: none;
}

.ar-about-value a:hover {
    text-decoration: underline;
}

/* Download Button */
.ar-download-section {
    margin: 20px 0;
    text-align: center;
}

.ar-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 40px;
    background: var(--ar-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(0,200,83,0.3);
}

.ar-download-btn:hover {
    background: var(--ar-primary-dark);
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

/* Download icon */
.ar-download-icon {
    font-size: 18px;
}

/* Pulse animation */
.ar-pulse {
    animation: ar-pulse-anim 2.5s ease-in-out infinite;
}

@keyframes ar-pulse-anim {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0,200,83,0.3);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 4px 20px rgba(0,200,83,0.5);
    }
}

.ar-pulse:hover {
    animation: none;
    transform: translateY(-1px);
}

/* Dual download buttons (download page) */
.ar-download-dual {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ar-btn-playstore {
    background: var(--ar-primary);
}

.ar-btn-appstore {
    background: #1a1a2e;
}

.ar-btn-appstore:hover {
    background: #333;
}

.ar-download-dual .ar-download-btn {
    padding: 14px 32px;
    flex: 0 1 auto;
}

/* Screenshots */
.ar-screenshots {
    background: var(--ar-card-bg);
    border-radius: var(--ar-radius);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.ar-screenshots-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}

.ar-screenshots-scroll::-webkit-scrollbar {
    height: 6px;
}

.ar-screenshots-scroll::-webkit-scrollbar-track {
    background: var(--ar-bg);
    border-radius: 3px;
}

.ar-screenshots-scroll::-webkit-scrollbar-thumb {
    background: var(--ar-border);
    border-radius: 3px;
}

.ar-screenshots-scroll img {
    height: 300px;
    width: auto;
    border-radius: 12px;
    scroll-snap-align: start;
    flex-shrink: 0;
    object-fit: cover;
}

/* Editor Review */
.ar-editor-review {
    background: var(--ar-card-bg);
    border-radius: var(--ar-radius);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.ar-review-content {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
}

.ar-review-content p {
    margin-bottom: 16px;
}

.ar-review-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
}

/* Ratings Breakdown */
.ar-ratings {
    background: var(--ar-card-bg);
    border-radius: var(--ar-radius);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.ar-ratings-content {
    display: flex;
    gap: 32px;
    align-items: center;
}

.ar-ratings-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.ar-big-rating {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    color: var(--ar-text);
}

.ar-total-reviews {
    font-size: 13px;
    color: var(--ar-text-light);
}

.ar-rating-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ar-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ar-bar-label {
    width: 14px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: var(--ar-text-light);
}

.ar-bar {
    flex: 1;
    height: 10px;
    background: var(--ar-bg);
    border-radius: 5px;
    overflow: hidden;
}

.ar-bar-fill {
    height: 100%;
    background: var(--ar-primary);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.ar-bar-pct {
    width: 36px;
    font-size: 12px;
    color: var(--ar-text-light);
    text-align: right;
}

/* Disclaimer */
.ar-disclaimer {
    background: var(--ar-card-bg);
    border-radius: var(--ar-radius);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.ar-disclaimer-item {
    position: relative;
    padding-left: 22px;
    font-size: 14px;
    color: var(--ar-text);
    line-height: 1.7;
    margin-bottom: 14px;
}

.ar-disclaimer-item:last-child {
    margin-bottom: 0;
}

.ar-disclaimer-item::before {
    content: "\25C9";
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--ar-primary-dark);
    font-size: 14px;
}

/* Best Apps */
.ar-best-apps {
    background: var(--ar-card-bg);
    border-radius: var(--ar-radius);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.ar-best-apps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.ar-app-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--ar-border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--ar-text);
    transition: box-shadow 0.2s, transform 0.1s;
}

.ar-app-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--ar-text);
}

.ar-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.ar-card-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ar-card-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ar-card-dev {
    font-size: 12px;
    color: var(--ar-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ar-card-rating {
    font-size: 12px;
    color: var(--ar-star-color);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .ar-about-table {
        grid-template-columns: 1fr;
    }

    .ar-about-cell {
        border-right: none !important;
    }

    .ar-about-cell:nth-last-child(-n+2) {
        border-bottom: 1px solid var(--ar-border) !important;
    }

    .ar-about-cell:last-child {
        border-bottom: none !important;
    }

    .ar-ratings-content {
        flex-direction: column;
        gap: 20px;
    }

    .ar-rating-bars {
        width: 100%;
    }

    .ar-best-apps-grid {
        grid-template-columns: 1fr;
    }

    .ar-screenshots-scroll img {
        height: 240px;
    }

    .ar-app-name {
        font-size: 20px;
    }

    .ar-download-dual {
        flex-direction: column;
        align-items: center;
    }

    .ar-download-dual .ar-download-btn {
        width: 100%;
        max-width: 300px;
    }
}

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

    .ar-header {
        padding: 16px;
    }

    .ar-app-icon {
        width: 64px;
        height: 64px;
    }

    .ar-about,
    .ar-screenshots,
    .ar-editor-review,
    .ar-ratings,
    .ar-disclaimer,
    .ar-best-apps {
        padding: 16px;
    }

    .ar-screenshots-scroll img {
        height: 200px;
    }

    .ar-big-rating {
        font-size: 36px;
    }
}
