/* =====================================================
   Public app landing page (e.g. /clubinr/)
   Theme colours come from CSS variables set by app.php
   Font: DM Sans
   ===================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8fafc;
    color: #1a202c;
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
.container {
    max-width: 420px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Header */
.header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}
.logo-section { display: flex; align-items: center; gap: 10px; }
.logo {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 6px; line-height: 1;
}
.site-title { font-size: 14px; font-weight: 600; color: white; }
.back-btn {
    background: rgba(255,255,255,0.2);
    border: none; color: white; cursor: pointer;
    padding: 6px 10px; border-radius: 4px;
    text-decoration: none;
    display: flex; align-items: center; gap: 4px;
    font-size: 12px;
    transition: background 0.2s;
}
.back-btn:hover { background: rgba(255,255,255,0.32); }

.main-content { padding: 16px; }

/* App icon + name */
.app-header { text-align: center; margin-bottom: 20px; }
.app-icon {
    width: 80px; height: 80px;
    border-radius: 16px;
    margin: 0 auto 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    overflow: hidden;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-name {
    font-size: 20px; font-weight: 700;
    color: #1a202c; margin-bottom: 4px;
}

/* Stats row */
.app-stats {
    display: flex; justify-content: space-between;
    background: #f8fafc;
    padding: 12px; border-radius: 8px;
    margin-bottom: 16px;
}
.stat-item { text-align: center; flex: 1; }
.stat-value { font-size: 14px; font-weight: 700; color: #1a202c; margin-bottom: 2px; }
.stat-label { font-size: 10px; color: #6b7280; font-weight: 500; }

/* Action buttons */
.action-buttons {
    display: flex; flex-direction: column; gap: 8px;
    margin-bottom: 20px;
}
.btn {
    padding: 12px 20px;
    border: none; border-radius: 8px;
    font-weight: 700; font-size: 14px;
    cursor: pointer; text-decoration: none;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all 0.2s;
    text-align: center;
    font-family: inherit;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}
.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.btn-secondary:hover { background: var(--primary-color); color: white; }

/* Description block */
.app-description {
    background: white; padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
    margin-bottom: 16px;
}
.app-description p {
    color: #4b5563;
    line-height: 1.6;
    font-size: 13px;
    margin-bottom: 12px;
}

/* Generic content sections */
.blog-section, .extended-section {
    background: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
    margin-bottom: 16px;
}
.blog-section h3, .extended-section h3 {
    font-size: 16px; font-weight: 700;
    color: #1a202c; margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.blog-section p, .extended-section p {
    color: #4b5563; line-height: 1.6;
    font-size: 13px; margin-bottom: 10px;
}
.blog-section, .blog-section p, .blog-section li,
.extended-section, .extended-section p, .extended-section li {
    overflow-wrap: anywhere; word-break: break-word;
}
.blog-section ol {
    color: #4b5563; font-size: 13px;
    padding-left: 18px; margin: 0 0 10px;
}
.blog-section ul {
    list-style: none;
    color: #4b5563; font-size: 13px;
    padding-left: 0;
}
.blog-section li {
    padding: 6px 0; padding-left: 20px;
    position: relative;
}
.blog-section li:before {
    content: "✓"; position: absolute; left: 0;
    color: var(--primary-color); font-weight: 700;
}
.extended-section ul {
    list-style: none;
    color: #4b5563; font-size: 13px;
    padding-left: 0;
}
.extended-section li {
    padding: 6px 0; padding-left: 20px;
    position: relative;
}
.extended-section li:before {
    content: "✓"; position: absolute; left: 0;
    color: var(--primary-color); font-weight: 700;
}

/* Related games grid */
.related-games { margin-bottom: 16px; }
.related-games h3 {
    font-size: 18px; font-weight: 700;
    color: #1a202c; margin-bottom: 8px;
    display: flex; align-items: center; gap: 8px;
}
.related-games p { color: #6b7280; font-size: 13px; margin-bottom: 16px; }
.apps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.app-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none; color: inherit;
    display: flex; flex-direction: column;
    cursor: pointer;
}
.app-card:hover { transform: translateY(-4px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.app-card-image {
    width: 100%; height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.app-card-image img { width: 100%; height: 100%; object-fit: cover; }
.app-card-content { padding: 10px; flex: 1; display: flex; flex-direction: column; }
.app-card-title {
    font-size: 13px; font-weight: 700;
    color: #1a202c; margin-bottom: 4px;
    line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.app-card-bonus { font-size: 11px; color: #059669; font-weight: 600; margin-bottom: 4px; }
.app-card-withdraw { font-size: 11px; color: #0f766e; font-weight: 600; margin-bottom: 4px; }
.app-card-rating { font-size: 11px; color: #6b7280; }
.app-card-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8px;
    border: none; border-radius: 6px;
    font-size: 12px; font-weight: 700;
    cursor: pointer; margin-top: 8px;
    text-align: center; text-decoration: none;
    display: block;
}
.app-card-button:hover { opacity: 0.9; }

/* Notice & alert boxes */
.notice-box, .alert-box {
    border-radius: 8px;
    padding: 12px;
    font-size: 12px;
    line-height: 1.6;
}
.notice-box { background: #fef3c7; border: 1px solid #f59e0b; color: #92400e; }
.alert-box  { background: #fee2e2; border: 1px solid #ef4444; color: #991b1b; }

/* FAQs */
.faq-list details {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}
.faq-list summary {
    cursor: pointer; font-weight: 700;
    color: #111827; font-size: 13px;
}
.faq-list p { margin-top: 8px; font-size: 12px; color: #4b5563; }

/* Reviews / stats / security / steps / trust grids */
.stats-grid, .review-grid, .security-grid, .steps-grid, .trust-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.stat-card, .review-card, .security-card, .step-card, .trust-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    font-size: 12px;
    line-height: 1.5;
}
.stat-card strong, .review-card strong, .security-card strong, .step-card strong, .trust-card strong {
    display: block; font-size: 12px;
    color: #111827; margin-bottom: 4px;
}
.review-card span { color: #6b7280; font-size: 11px; }

/* Keyword cloud */
.keyword-cloud {
    display: flex; gap: 8px;
    overflow-x: auto;
    padding: 15px 10px;
    background: #f8fafc;
    border: 1px dashed #cbd5f5;
    border-radius: 8px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.keyword-cloud::-webkit-scrollbar { height: 6px; }
.keyword-cloud::-webkit-scrollbar-track { background: #e0e0e0; border-radius: 10px; }
.keyword-cloud::-webkit-scrollbar-thumb { background: #cbd5f5; border-radius: 10px; }
.query-badge {
    display: inline-block; padding: 6px 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white; border-radius: 20px;
    font-size: 12px; font-weight: 500;
    white-space: nowrap; flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Requirements table */
.req-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.req-table th, .req-table td {
    text-align: left; padding: 8px;
    border-bottom: 1px solid #e5e7eb;
}
.req-table th { color: #111827; font-weight: 700; }

/* CTA box */
.cta-box {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.cta-box h3 { color: #fff !important; justify-content: center; }
.cta-box p { color: #ffffff !important; }
.cta-box a {
    display: inline-block; margin-top: 10px;
    background: #fff; color: #111827;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none; font-weight: 700;
}
