/*
Theme Name: Old Yono Games Crimson
Theme URI: https://oldyonogames.com
Author: Manish Choudhary
Description: Ultra-clean Red-500 directory UI with soft ambient shadows
Version: 4.0.0
*/

:root {
    --bg-page: #f8fafc;
    --card-surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-sub: #94a3b8;
    
    /* Tailwind Red-500 Palette */
    --red-500: #ef4444;
    --red-600: #dc2626;
    --red-soft: #fef2f2;
    --red-border: #fee2e2;

    /* Telegram Blue Palette */
    --tg-blue: #0ea5e9;
    --tg-blue-hover: #0284c7;

    --border-card: #f1f5f9;
    --border-subtle: #e2e8f0;

    --shadow-soft: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
    --shadow-elevated: 0 10px 30px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.03);

    --radius-btn: 8px;
    --radius-card: 16px;
    --radius-pill: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.site-width {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.main-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
}

.logo-badge {
    background: var(--red-500);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 5px 9px;
    border-radius: 8px;
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.home-nav-link {
    text-decoration: none;
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
    padding: 6px 16px;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.home-nav-link:hover {
    background: var(--red-500);
    color: #ffffff;
    border-color: var(--red-500);
}

/* Hero Section with Corner Shapes & Subtle Gradient */
.hero-card {
    position: relative;
    overflow: hidden;
    background: radial-gradient(130% 100% at 50% 0%, #fff7f7 0%, #ffffff 70%);
    border: 1px solid #fecaca;
    border-radius: var(--radius-card);
    padding: 32px 24px 26px;
    text-align: center;
    margin: 20px 0 26px;
    box-shadow: var(--shadow-soft);
}

/* Geometric Corner Shapes */
.shape-corner {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    pointer-events: none;
}
.shape-tl {
    top: -60px;
    left: -50px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
}
.shape-br {
    bottom: -60px;
    right: -50px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
}

.hero-pill-tag {
    display: inline-block;
    background: var(--red-soft);
    color: var(--red-500);
    border: 1px solid var(--red-border);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    margin-bottom: 10px;
}

.hero-card h1 {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.6px;
    color: var(--text-main);
    margin-bottom: 8px;
}

.hero-description {
    color: var(--text-muted);
    font-size: 0.92rem;
    max-width: 580px;
    margin: 0 auto 22px;
    line-height: 1.55;
}

/* Modern Search Container with Submit Button */
.search-form-wrap {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid var(--border-subtle);
    border-radius: 12px;
    padding: 4px 5px 4px 14px;
    max-width: 520px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form-wrap:focus-within {
    border-color: var(--red-500);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.search-form-wrap input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.92rem;
    color: var(--text-main);
    background: transparent;
    padding: 8px 6px;
}

.search-btn {
    background: var(--red-500);
    color: #ffffff;
    border: none;
    outline: none;
    padding: 9px 18px;
    border-radius: var(--radius-btn);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease;
}

.search-btn:hover {
    background: var(--red-600);
}

.hero-footnote {
    font-size: 0.78rem;
    color: var(--text-sub);
    margin-top: 14px;
}

/* Headings */
.section-headline {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin: 28px 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-headline::before {
    content: "";
    width: 4px;
    height: 16px;
    background: var(--red-500);
    border-radius: 2px;
}

/* Leaderboard Podium UI */
.podium-container {
    display: grid;
    grid-template-columns: 1fr 1.1fr 1fr;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 26px;
}

.podium-slot {
    background: var(--card-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    padding: 16px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-soft);
    position: relative;
    transition: transform 0.2s ease;
}

.podium-slot:hover {
    transform: translateY(-3px);
}

.podium-slot.rank-1 {
    padding: 24px 14px 20px;
    border: 1.5px solid #fca5a5;
    background: linear-gradient(180deg, #ffffff 60%, var(--red-soft) 100%);
    box-shadow: var(--shadow-elevated);
}

.rank-pill {
    position: absolute;
    top: -10px;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
}

.rank-1 .rank-pill { background: #f59e0b; color: #ffffff; }
.rank-2 .rank-pill { background: #e2e8f0; color: #475569; }
.rank-3 .rank-pill { background: #fed7aa; color: #9a3412; }

.podium-avatar {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    object-fit: cover;
    margin-bottom: 8px;
    border: 1px solid var(--border-subtle);
}

.rank-1 .podium-avatar {
    width: 72px;
    height: 72px;
}

.podium-name {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.podium-bonus {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--red-500);
    margin: 2px 0 10px;
}

.podium-cta {
    display: block;
    width: 100%;
    background: var(--red-500);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 8px 0;
    border-radius: var(--radius-btn);
    transition: background 0.18s ease;
}

.podium-cta:hover {
    background: var(--red-600);
}

/* Redesigned Modern App Card (With Category Badge & Height) */
.apps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-row-card {
    background: var(--card-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    box-shadow: var(--shadow-soft);
    position: relative;
    transition: all 0.2s ease;
}

.app-row-card:hover {
    border-color: #e2e8f0;
    box-shadow: var(--shadow-elevated);
    transform: translateY(-2px);
}

.card-left-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-list-icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    object-fit: cover;
    background: #f1f5f9;
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.app-info-block {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.app-cat-badge {
    align-self: flex-start;
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    padding: 1px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.app-title-text {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
}

.app-bonus-pill {
    display: inline-block;
    color: var(--red-500);
    font-size: 0.82rem;
    font-weight: 700;
}

/* Solid Red-500 Download Button */
.action-btn-pill {
    background: var(--red-500);
    color: #ffffff;
    text-decoration: none;
    padding: 9px 20px;
    border-radius: var(--radius-btn);
    font-size: 0.85rem;
    font-weight: 700;
    border: none;
    transition: background 0.18s ease;
    flex-shrink: 0;
}

.action-btn-pill:hover {
    background: var(--red-600);
}

/* Discover More Keywords */
.keywords-card {
    background: var(--card-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    padding: 24px;
    margin: 34px 0 24px;
    box-shadow: var(--shadow-soft);
}

.keywords-card h3 {
    font-size: 1.08rem;
    font-weight: 800;
}

.keywords-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 4px 0 14px;
}

.pills-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pill-chip {
    background: var(--bg-page);
    border: 1px solid var(--border-subtle);
    color: #475569;
    padding: 4px 11px;
    border-radius: var(--radius-pill);
    font-size: 0.76rem;
    font-weight: 500;
}

/* Overhauled Single App Page */
.breadcrumb-nav {
    display: flex;
    gap: 8px;
    padding: 16px 0 10px;
    font-size: 0.8rem;
    color: var(--text-sub);
}

.breadcrumb-nav a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb-nav span.current {
    color: var(--text-main);
    font-weight: 600;
}

/* Tight margin and balanced breathing space */
.app-hero-panel {
    background: var(--card-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    padding: 26px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
}

.app-header-row {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
}

.app-main-avatar {
    width: 82px;
    height: 82px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    flex-shrink: 0;
}

.app-meta-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-meta-col h1 {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-main);
}

.app-badges-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.badge-cat-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-bonus-tag {
    background: var(--red-soft);
    color: var(--red-500);
    border: 1px solid var(--red-border);
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge-date-tag {
    color: var(--text-sub);
    font-size: 0.8rem;
}

/* Refined Action Buttons (No gradients) */
.dual-cta-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.cta-download {
    background: var(--red-500);
    color: #ffffff;
    text-decoration: none;
    padding: 13px;
    border-radius: var(--radius-btn);
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    transition: background 0.18s ease;
}

.cta-download:hover {
    background: var(--red-600);
}

.cta-telegram {
    background: var(--tg-blue);
    color: #ffffff;
    text-decoration: none;
    padding: 13px;
    border-radius: var(--radius-btn);
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    transition: background 0.18s ease;
}

.cta-telegram:hover {
    background: var(--tg-blue-hover);
}

/* Share Module */
.share-module {
    background: #fafafa;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.share-title-text {
    font-size: 0.9rem;
    font-weight: 800;
    margin-bottom: 3px;
}

.share-sub-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.share-buttons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.s-chip {
    padding: 8px 16px;
    border-radius: var(--radius-btn);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.s-share { background: #334155; color: #ffffff; }
.s-wa { background: #16a34a; color: #ffffff; }
.s-tg { background: var(--tg-blue); color: #ffffff; }
.s-copy { background: #ffffff; border: 1px solid var(--border-subtle); color: var(--text-main); }

/* About Section */
.about-panel {
    border-top: 1px solid var(--border-subtle);
    padding-top: 20px;
}

.about-panel h2 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.about-content {
    font-size: 0.92rem;
    color: #334155;
    line-height: 1.7;
}

/* Footer */
.main-footer {
    border-top: 1px solid var(--border-subtle);
    background: var(--card-surface);
    padding: 24px 0;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-sub);
    margin-top: 36px;
}

@media (max-width: 540px) {
    .dual-cta-group {
        grid-template-columns: 1fr;
    }
    .app-header-row {
        gap: 14px;
    }
    .app-main-avatar {
        width: 70px;
        height: 70px;
    }
}
