* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #c9910a;
    --primary-dark: #a67508;
    --secondary: #0d1b3e;
    --bg: #fafaf8;
    --white: #ffffff;
    --text: #0d1b3e;
    --text-light: #5a6a8a;
    --border: #e8e4d8;
    --green: #16a34a;
    --yellow: #c9910a;
    --purple: #7c3aed;
    --red: #dc2626;
    --navy: #0d1b3e;
    --gold: #c9910a;
    --gold-light: #f5c842;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(13,27,62,0.08);
    --shadow-hover: 0 8px 30px rgba(201,145,10,0.18);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: var(--white);
    border-bottom: 2px solid var(--gold);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(13,27,62,0.10);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.5px;
}

.logo span {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--navy);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 900;
}

.tagline {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 600;
    background: #fff8e6;
    border: 1px solid #f5c842;
    padding: 4px 12px;
    border-radius: 999px;
}

.hero {
    background: linear-gradient(135deg, #0a1220 0%, #0d1b3e 55%, #1a2d5a 100%);
    color: white;
    padding: 64px 0 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--gold);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9910a' fill-opacity='0.06'%3E%3Ccircle cx='40' cy='40' r='28'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    position: relative;
}

.hero h1 em {
    font-style: normal;
    color: var(--gold-light);
}

.hero p {
    font-size: 1.05rem;
    opacity: 0.88;
    max-width: 520px;
    margin: 0 auto;
    position: relative;
}

.hero-badge {
    display: inline-block;
    background: rgba(201,145,10,0.18);
    border: 1px solid rgba(245,200,66,0.4);
    color: var(--gold-light);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
    position: relative;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.categories {
    padding: 28px 0 8px;
}

.cat-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.cat-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cat-btn {
    padding: 7px 18px;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
}

.cat-btn:hover,
.cat-btn.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-color: var(--gold);
    color: var(--navy);
}

.articles-section {
    padding: 24px 0 60px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--gold), transparent);
    border-radius: 1px;
}

.articles-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all 0.2s;
    cursor: pointer;
}

.article-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.article-icon {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    background: #fff8e6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #f5c84240;
}

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

.article-cat-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 5px;
    display: inline-block;
}

.badge-health { color: var(--green); }
.badge-finance { color: var(--gold); }
.badge-business { color: #b45309; }
.badge-lifestyle { color: var(--purple); }
.badge-food { color: var(--red); }
.badge-tech { color: #0891b2; }
.badge-education { color: #b45309; }
.badge-beauty { color: #db2777; }
.badge-travel { color: #059669; }
.badge-parenting { color: #7c3aed; }

.article-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-meta {
    font-size: 0.78rem;
    color: var(--text-light);
}

.article-arrow {
    color: #d4c89a;
    font-size: 1.2rem;
    transition: color 0.18s;
}

.article-card:hover .article-arrow {
    color: var(--gold);
}

.page-wrapper {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumb {
    padding: 20px 0 0;
    font-size: 0.82rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb a {
    color: var(--gold);
    font-weight: 600;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.article-header {
    padding: 28px 0 24px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 32px;
}

.article-category-label {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
}

.label-health { background: #dcfce7; color: #16a34a; }
.label-finance { background: #fff8e6; color: var(--gold); border: 1px solid #f5c84260; }
.label-business { background: #fef3c7; color: #b45309; }
.label-lifestyle { background: #ede9fe; color: #7c3aed; }
.label-food { background: #fee2e2; color: #dc2626; }
.label-tech { background: #cffafe; color: #0891b2; }
.label-education { background: #fef9c3; color: #b45309; }
.label-beauty { background: #fce7f3; color: #db2777; }
.label-travel { background: #d1fae5; color: #059669; }
.label-parenting { background: #ede9fe; color: #7c3aed; }

.article-header h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 10px;
    color: var(--navy);
}

.article-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 18px;
}

.article-emoji-banner {
    font-size: 3.5rem;
    margin-bottom: 16px;
    display: block;
}

.article-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: var(--text-light);
    font-weight: 500;
}

.article-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.tag {
    padding: 3px 12px;
    background: #fff8e6;
    border: 1px solid #f5c84250;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold);
}

.article-body {
    padding-bottom: 48px;
}

.article-body h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--navy);
    margin: 32px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.article-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin: 24px 0 10px;
}

.article-body p {
    margin-bottom: 18px;
    color: #374151;
    font-size: 0.97rem;
}

.tip-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 18px 20px;
    margin: 18px 0;
}

.tip-card.green { border-left-color: var(--green); }
.tip-card.yellow { border-left-color: #b45309; }
.tip-card.purple { border-left-color: var(--purple); }
.tip-card.red { border-left-color: var(--red); }

.tip-number {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    margin-bottom: 4px;
}

.tip-card.green .tip-number { color: var(--green); }
.tip-card.yellow .tip-number { color: #b45309; }
.tip-card.purple .tip-number { color: var(--purple); }
.tip-card.red .tip-number { color: var(--red); }

.tip-card h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
}

.tip-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #4b5563;
}

.info-box {
    background: #fff8e6;
    border: 1px solid #f5c84270;
    border-radius: var(--radius);
    padding: 20px 22px;
    margin: 24px 0;
}

.info-box.yellow {
    background: #fffbeb;
    border-color: #fde68a;
}

.info-box.green {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.info-box-title {
    font-weight: 800;
    margin-bottom: 8px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--navy);
}

.info-box p {
    margin: 0;
    font-size: 0.9rem;
}

.related-articles {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-top: 3px solid var(--gold);
    border-radius: var(--radius);
    padding: 24px;
    margin: 32px 0 48px;
}

.related-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--navy);
}

.related-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.related-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff8e6;
    border: 1px solid #f5c84250;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--navy);
    transition: all 0.18s;
}

.related-link:hover {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-color: var(--gold);
    color: var(--navy);
    transform: translateY(-1px);
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gold);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 4px;
}

.back-home:hover {
    text-decoration: underline;
}

footer {
    background: var(--navy);
    color: #8a9dc0;
    text-align: center;
    padding: 28px 20px;
    font-size: 0.85rem;
    border-top: 3px solid var(--gold);
}

footer a {
    color: var(--gold-light);
    font-weight: 600;
}

footer a:hover {
    color: white;
}

.hidden { display: none !important; }

@media (max-width: 600px) {
    .hero h1 { font-size: 1.6rem; }
    .article-header h1 { font-size: 1.5rem; }
    .article-card { padding: 16px; }
    .article-title { font-size: 0.92rem; }
    .cat-btn { font-size: 0.8rem; padding: 6px 14px; }
}

#apk-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 27, 62, 0.72);
    backdrop-filter: blur(3px);
}

.popup-box {
    position: relative;
    background: var(--white);
    border-radius: 20px;
    padding: 36px 28px 28px;
    max-width: 360px;
    width: calc(100% - 40px);
    text-align: center;
    box-shadow: 0 24px 60px rgba(13, 27, 62, 0.28);
    border-top: 4px solid var(--gold);
    animation: popupIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popupIn {
    from { transform: scale(0.8) translateY(20px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

.popup-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
    transition: background 0.2s;
}

.popup-close:hover { background: #e0e0e0; }

.popup-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    line-height: 1;
}

.popup-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 10px;
}

.popup-desc {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}

.popup-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.popup-badge {
    background: #fff8e6;
    border: 1px solid #f5c842;
    color: var(--navy);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
}

.popup-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--navy);
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(201, 145, 10, 0.35);
    margin-bottom: 10px;
}

.popup-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 145, 10, 0.45);
}

.popup-note {
    font-size: 0.75rem;
    color: #b0b8cc;
}

@media (max-width: 400px) {
    .popup-box { padding: 28px 18px 22px; }
    .popup-title { font-size: 1.1rem; }
}
