/**
 * Single Page — Material Design 3 Green Theme
 * Fully restructured layout with new component classes
 */

/* ==================== VARIABLES ==================== */
:root {
    --md-primary: #16a34a;
    --md-primary-dark: #15803d;
    --md-primary-light: #4ade80;
    --md-surface: #f8faf9;
    --md-container: #f0faf4;
    --md-container-low: #f5fbf7;
    --md-container-high: #e8f5ed;
    --md-text: #111827;
    --md-text-secondary: #374151;
    --md-text-muted: #6b7280;
    --md-outline: #d1d5db;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-elevated: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 10px 40px rgba(22, 163, 74, 0.25);
    --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ==================== BASE ==================== */
.game-single {
    padding-bottom: 80px;
    font-family: var(--font-stack);
}

/* ==================== BREADCRUMBS V2 ==================== */
.breadcrumbs-v2 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    z-index: 1;
}

.breadcrumbs-v2 a {
    color: var(--md-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs-v2 a:hover {
    color: var(--md-primary);
}

.breadcrumbs-v2__sep {
    font-size: 9px;
    color: var(--md-outline);
    line-height: 1;
}

.breadcrumbs-v2__current {
    color: var(--md-primary);
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================== HERO CARD ==================== */
.hero-card {
    background: linear-gradient(160deg, #f0fdf4 0%, #ecfdf5 40%, #e8f5ed 100%);
    padding: 40px 0 50px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.hero-card__blob {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 350px;
    height: 350px;
    background: rgba(22, 163, 74, 0.06);
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

/* ==================== HERO CARD INNER ==================== */
.hero-card__inner {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

/* ==================== HERO ICON ==================== */
.hero-card__icon {
    width: 160px;
    height: 160px;
    background: #fff;
    border-radius: 32px;
    box-shadow: 0 12px 32px -4px rgba(0, 54, 36, 0.08);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.hero-card__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-card__mod-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

/* ==================== HERO INFO ==================== */
.hero-card__info {
    flex-grow: 1;
    min-width: 0;
}

/* ==================== HERO TAGS ==================== */
.hero-card__tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.hero-tag {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    line-height: 1.4;
}

.hero-tag--verified {
    background: #16a34a;
    color: #fff;
}

.hero-tag--version {
    background: rgba(22, 163, 74, 0.1);
    color: var(--md-primary-dark);
}

/* ==================== HERO TITLE ==================== */
.hero-card__title {
    font-size: 36px;
    font-weight: 800;
    color: var(--md-text);
    letter-spacing: -0.5px;
    line-height: 1.15;
    margin: 0 0 8px;
}

/* ==================== HERO DEVELOPER ==================== */
.hero-card__developer {
    font-size: 15px;
    color: var(--md-text-secondary);
    margin-bottom: 20px;
}

.hero-card__developer i {
    color: var(--md-text-muted);
    margin-right: 6px;
}

/* ==================== HERO STATS ==================== */
.hero-card__stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--md-text-secondary);
}

.hero-stat strong {
    font-size: 18px;
    color: var(--md-text);
    font-weight: 800;
}

.hero-stat i {
    color: var(--md-primary);
}

.hero-stat__divider {
    width: 1px;
    height: 20px;
    background: rgba(133, 184, 158, 0.3);
}

/* ==================== SVG STAR RATING (privatki-style) ==================== */
.sh-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.sh-stars {
    display: flex;
    gap: 2px;
}

.star-vote {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
    line-height: 1;
}

.star-vote:hover {
    transform: scale(1.15);
}

.star-vote .star-svg {
    display: block;
}

.sh-rating-num {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--md-text);
    letter-spacing: -0.02em;
}

.sh-rating-count {
    font-size: 0.82rem;
    color: var(--md-text-muted);
}

.sh-rating-hint {
    font-size: 0.75rem;
    color: var(--md-primary);
    margin-left: auto;
}

/* ==================== HERO ACTIONS ==================== */
.hero-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* Primary download CTA */
.btn-hero-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--md-primary), var(--md-primary-light));
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 14px;
    border: none;
    text-decoration: none;
    box-shadow: var(--shadow-glow);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hero-download i {
    margin-right: 4px;
    font-size: 18px;
}

.btn-hero-download__size {
    opacity: 0.8;
    font-weight: 500;
    font-size: 14px;
    margin-left: 4px;
}

/* Shimmer sweep on hover */
.btn-hero-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-hero-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 44px rgba(22, 163, 74, 0.35);
    color: #fff;
}

.btn-hero-download:hover::before {
    left: 100%;
}

/* Secondary button */
.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: #fff;
    border: 2px solid var(--md-outline);
    color: var(--md-primary);
    font-size: 14px;
    font-weight: 600;
    border-radius: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-hero-secondary:hover {
    background: var(--md-surface);
    border-color: var(--md-primary);
    color: var(--md-primary);
}

/* Vote buttons inside hero */
.hero-votes {
    display: flex;
    gap: 8px;
}

.hero-votes .vote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 54, 36, 0.12);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--md-text);
    cursor: pointer;
    transition: all 0.25s ease;
}

.hero-votes .vote-btn.like:hover,
.hero-votes .vote-btn.like.active {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.4);
    color: #15803d;
}

.hero-votes .vote-btn.dislike:hover,
.hero-votes .vote-btn.dislike.active {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
    color: #dc2626;
}

/* ==================== TABLE OF CONTENTS ==================== */
.toc-block {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
}

.toc-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--md-text);
    margin-bottom: 14px;
}

.toc-title i {
    color: var(--md-primary);
    margin-right: 8px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 16px;
    counter-reset: toc;
}

.toc-list li {
    counter-increment: toc;
}

.toc-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--md-text-secondary);
    text-decoration: none;
    transition: all 0.15s ease;
}

.toc-list a:hover {
    background: #f0fdf4;
    color: var(--md-primary);
}

.toc-list a i {
    font-size: 0.75rem;
    color: var(--md-text-muted);
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    transition: color 0.15s;
}

.toc-list a:hover i {
    color: var(--md-primary);
}

@media (max-width: 600px) {
    .toc-list {
        grid-template-columns: 1fr;
    }
}

/* ==================== CONTENT GRID ==================== */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
    margin-top: 32px;
}

.content-grid__main {
    min-width: 0;
}

.content-grid__sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==================== INTRO CARD ==================== */
.intro-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    border-left: 4px solid #16a34a;
}

.intro-card p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--md-text);
}

.intro-card p + p {
    margin-top: 12px;
}

/* ==================== CONTENT CARD ==================== */
.content-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
}

/* Typographic styles inside content card */
.content-card h2 {
    margin: 32px 0 16px;
    font-size: 24px;
    font-weight: 800;
    color: var(--md-text);
    letter-spacing: -0.3px;
}

.content-card h2:first-child {
    margin-top: 0;
}

.content-card h3 {
    margin: 24px 0 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--md-text-secondary);
}

.content-card p {
    margin-bottom: 18px;
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.content-card ul,
.content-card ol {
    margin-bottom: 18px;
    padding-left: 28px;
}

.content-card li {
    margin-bottom: 8px;
    line-height: 1.7;
    font-size: 15px;
    color: #444;
}

.content-card img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 16px 0;
    box-shadow: var(--shadow-elevated);
}

/* ==================== SPECS CARD (sidebar) ==================== */
.specs-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-card);
}

.specs-card__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--md-text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
}

.specs-card__title i {
    color: var(--md-primary);
    font-size: 16px;
}

.specs-card__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.specs-card__row:last-child {
    border-bottom: none;
}

.specs-card__label {
    color: var(--md-text-muted);
    font-size: 14px;
}

.specs-card__value {
    font-weight: 700;
    font-size: 14px;
    color: var(--md-text);
    text-align: right;
}

.specs-card__value--accent {
    color: var(--md-primary);
}

.specs-card__value a {
    color: var(--md-primary);
    text-decoration: none;
    transition: text-decoration 0.15s;
}

.specs-card__value a:hover {
    text-decoration: underline;
}

.specs-card__langs {
    font-size: 16px;
    letter-spacing: 2px;
}

.specs-multi {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0;
    vertical-align: middle;
}

/* ==================== REPORT CARD ==================== */
.report-card {
    display: flex;
    gap: 10px;
}

.report-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.report-btn:hover {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #16a34a;
}

/* ==================== TRUST BADGE CARD ==================== */
.trust-badge-card {
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.trust-badge-card i {
    font-size: 32px;
    color: var(--md-primary);
    margin-bottom: 10px;
    display: block;
}

.trust-badge-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--md-text);
    margin: 0 0 6px;
}

.trust-badge-card p {
    font-size: 12px;
    color: var(--md-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ==================== MOBILE INFO STRIP ==================== */
.mobile-info-strip {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-info-strip {
        display: block;
        padding-top: 20px;
        padding-bottom: 4px;
    }

    .mobile-info-strip__grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    /* Hide sidebar versions on mobile since we show them above */
    .content-grid__sidebar .specs-card,
    .content-grid__sidebar .trust-badge-card,
    .content-grid__sidebar .report-card {
        display: none;
    }
}

@media (max-width: 600px) {
    .mobile-info-strip__grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== REPORT MODAL ==================== */
.report-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
}

.report-modal.active {
    display: flex;
}

.report-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 54, 36, 0.5);
    backdrop-filter: blur(4px);
}

.report-modal__content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 54, 36, 0.2);
    z-index: 1;
}

.report-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--md-text-muted);
    cursor: pointer;
    padding: 4px;
}

.report-modal__close:hover {
    color: var(--md-text);
}

.report-modal__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--md-text);
    margin: 0 0 20px;
}

.report-modal textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--md-outline);
    border-radius: 12px;
    font-size: 15px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s;
}

.report-modal textarea:focus {
    outline: none;
    border-color: var(--md-primary);
}

.report-modal__submit {
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.25s;
}

.report-modal__submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(22, 163, 74, 0.3);
}

.report-modal__success {
    text-align: center;
    padding: 20px 0;
}

.report-modal__success i {
    font-size: 48px;
    color: #16a34a;
    margin-bottom: 12px;
}

.report-modal__success p {
    font-size: 16px;
    color: var(--md-text);
    margin: 0;
}

/* ==================== RESPONSIVE — TABLET (<1024px) ==================== */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .content-grid__sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .hero-card__title {
        font-size: 30px;
    }

    .hero-card__icon {
        width: 140px;
        height: 140px;
        border-radius: 28px;
    }
}

/* ==================== RESPONSIVE — MOBILE (<768px) ==================== */
@media (max-width: 768px) {
    .hero-card {
        padding: 28px 0 36px;
    }

    .hero-card__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-card__icon {
        width: 120px;
        height: 120px;
        border-radius: 26px;
    }

    .hero-card__title {
        font-size: 28px;
    }

    .hero-card__tags {
        justify-content: center;
    }

    .hero-card__stats {
        justify-content: center;
    }

    .hero-stat__divider {
        display: none;
    }

    .hero-card__actions {
        justify-content: center;
        width: 100%;
    }

    .btn-hero-download {
        width: 100%;
        justify-content: center;
    }

    .content-grid {
        gap: 20px;
    }

    .content-grid__sidebar {
        grid-template-columns: 1fr;
    }

    .content-card {
        padding: 24px;
        border-radius: 14px;
    }

    .intro-card {
        padding: 20px;
    }
}

/* ==================== RESPONSIVE — SMALL (<480px) ==================== */
@media (max-width: 480px) {
    .breadcrumbs-v2 {
        font-size: 11px;
        justify-content: center;
        letter-spacing: 1px;
    }

    .hero-card__icon {
        width: 100px;
        height: 100px;
        border-radius: 22px;
    }

    .hero-card__title {
        font-size: 24px;
    }

    .hero-card__stats {
        gap: 12px;
    }

    .hero-stat strong {
        font-size: 16px;
    }

    .btn-hero-download {
        padding: 14px 24px;
        font-size: 15px;
    }

    .content-card {
        padding: 20px;
    }

    .content-card h2 {
        font-size: 20px;
    }

    .content-card p {
        font-size: 15px;
    }

    .specs-card {
        padding: 20px;
    }

    .hero-card__mod-badge {
        padding: 4px 8px;
        font-size: 9px;
    }
}
