.apple-homepage {
    padding: 40px 0 112px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", sans-serif;
    color: #172033;
}
.apple-container { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.apple-hero-section { margin-bottom: 30px; }

.wotd-card-wrapper {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr);
    gap: 16px;
    align-items: stretch;
}
.wotd-content {
    min-width: 0;
    height: 100%;
    padding: 24px;
    box-sizing: border-box;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(15,23,42,.09);
    border-radius: 26px;
    box-shadow: 0 10px 28px rgba(15,23,42,.05);
}

/* Tông đỏ san hô nhạt tinh tế đồng bộ với thanh dock */
.hero-side-banner {
    min-height: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 26px 22px;
    color: #182033;
    border: 1px solid rgba(234, 67, 53, 0.16);
    border-radius: 26px;
    background: radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.75), transparent 45%), linear-gradient(155deg, #fff5f4 0%, #ffe8e5 100%);
    box-shadow: 0 10px 28px rgba(234, 67, 53, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.side-badge {
    width: fit-content;
    margin: 0;
    padding: 6px 12px;
    border: 1px solid rgba(234, 67, 53, 0.2);
    border-radius: 999px;
    background: rgba(234, 67, 53, 0.08);
    color: #d9362a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
}

.hero-side-banner p {
    margin: 0;
    color: #2c1818;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.hero-text-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
    padding-top: 13px;
    border-top: 1px solid rgba(234, 67, 53, 0.14);
}

.hero-text-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 13px;
    border: 1px solid rgba(234, 67, 53, 0.18);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.78);
    color: #182033;
    text-decoration: none;
    font-size: 13px;
    font-weight: 650;
    box-shadow: 0 2px 6px rgba(234, 67, 53, 0.04);
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.hero-text-btn:hover {
    transform: translateX(3px);
    background: #ffffff;
    border-color: rgba(234, 67, 53, 0.42);
    color: #EA4335;
}

.btn-arrow {
    font-size: 19px;
    font-weight: 700;
    line-height: 1;
    color: #EA4335;
}

.apple-app-grid-section { margin-bottom: 24px; }
.apple-apps-flexible-grid { display:flex; flex-wrap:wrap; justify-content:center; gap:24px 26px; }
.apple-app-icon-item { width:88px; display:flex; flex-direction:column; align-items:center; gap:8px; color:inherit; text-decoration:none; cursor:pointer; transition:transform .24s cubic-bezier(.2,.8,.2,1); -webkit-tap-highlight-color:transparent; }
.apple-app-icon-item:hover { transform:translateY(-6px); }

.app-icon-box {
    position:relative; isolation:isolate; overflow:hidden;
    width:72px; height:72px; box-sizing:border-box;
    display:flex; align-items:center; justify-content:center;
    border:1px solid rgba(18,24,38,.12); border-radius:21px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f6f8 100%);
    box-shadow: 0 6px 16px rgba(15,23,42,.06), inset 0 1px 0 rgba(255,255,255,.95);
    color: #1f2937;
    transition: box-shadow .24s ease, border-color .24s ease, color .24s ease;
}
.app-icon-box svg,
.popup-app-icon svg {
    display: block;
    flex-shrink: 0;
}
.app-icon-box svg { width: 30px; height: 30px; }
.apple-app-icon-item:hover .app-icon-box {
    border-color: rgba(234,67,53,.45);
    color: #EA4335;
    box-shadow: 0 12px 24px rgba(15,23,42,.1), inset 0 1px 0 rgba(255,255,255,.95);
}
.app-label { width:100%; color:#182033; font-size:11px; font-weight:650; line-height:1.3; text-align:center; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

/* Popup overlay và modal */
.apple-popup-overlay {
    position:fixed; inset:0; z-index:99999;
    display:flex; align-items:center; justify-content:center;
    padding:18px; box-sizing:border-box;
    background:rgba(22,31,55,.34);
    backdrop-filter:blur(16px) saturate(125%); -webkit-backdrop-filter:blur(16px) saturate(125%);
    opacity:0; visibility:hidden; transition:opacity .24s ease, visibility .24s ease;
}
.apple-popup-overlay.active { opacity:1; visibility:visible; }
.apple-popup-card {
    width:min(92vw, 520px); max-width:520px; max-height: min(86vh, 760px);
    display:flex; flex-direction:column; overflow:hidden;
    border:1px solid rgba(255,255,255,.88); border-radius:30px;
    background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(248,250,255,.92));
    box-shadow:0 30px 90px rgba(17,31,68,.24), inset 0 1px 0 rgba(255,255,255,.95);
    backdrop-filter:blur(30px); -webkit-backdrop-filter:blur(30px);
    transform:translateY(12px) scale(.97); transition:transform .28s cubic-bezier(.2,.8,.2,1);
}
.apple-popup-overlay.active .apple-popup-card { transform:translateY(0) scale(1); }
.apple-popup-header {
    position:relative; flex:0 0 auto; min-height:76px; box-sizing:border-box;
    display:flex; align-items:center; justify-content:space-between; gap:8px;
    padding:14px 18px;
    background:rgba(248,249,253,.82);
    border-bottom:1px solid rgba(102,119,155,.13);
}
#popup-cat-tag { display:block; color:#EA4335; font-size:11px; font-weight:800; letter-spacing:.045em; line-height:1.3; text-transform:uppercase; }
#popup-title-text { color:#151d30; font-size:18px; font-weight:650; line-height:1.25; }
.apple-popup-back { min-width:76px; padding:7px 4px; border:0; background:transparent; color:#EA4335; font-size:13px; font-weight:700; text-align:left; cursor:pointer; }
.apple-popup-close { flex:0 0 34px; width:34px; height:34px; display:flex; align-items:center; justify-content:center; padding:0; border:1px solid rgba(15,23,42,.12); border-radius:50%; background:#ffffff; color:#536078; font-size:19px; line-height:1; cursor:pointer; transition:background .2s ease, color .2s ease, transform .2s ease; }
.apple-popup-close:hover { background:#fff5f5; color:#EA4335; border-color:rgba(234,67,53,.4); transform:rotate(90deg); }
.apple-popup-body { overflow-y:auto; overscroll-behavior:contain; max-height:calc(min(86vh,760px) - 76px); padding:26px 22px 30px; }
.popup-apps-grid { display:flex; flex-wrap:wrap; justify-content:center; align-items:flex-start; gap:24px 22px; }
.popup-app-item { width:82px; min-width:0; display:flex; flex-direction:column; align-items:center; gap:8px; color:inherit; text-decoration:none; cursor:pointer; transition:transform .2s ease; -webkit-tap-highlight-color:transparent; }
.popup-app-item:hover { transform:translateY(-4px); }

.popup-app-icon {
    position:relative; isolation:isolate; overflow:hidden;
    width:68px; height:68px; box-sizing:border-box;
    display:flex; align-items:center; justify-content:center;
    border:1px solid rgba(18,24,38,.12); border-radius:20px;
    background:linear-gradient(180deg,#ffffff 0%,#f5f6f8 100%);
    box-shadow:0 6px 14px rgba(15,23,42,.06), inset 0 1px 0 rgba(255,255,255,.95);
    color:#1f2937;
    transition:box-shadow .2s ease, border-color .2s ease, color .2s ease;
}
.popup-app-icon svg { width: 28px; height: 28px; }
.popup-app-icon .svg-badge-text {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}
.popup-app-item:hover .popup-app-icon {
    border-color:rgba(234,67,53,.45);
    color:#EA4335;
    box-shadow:0 10px 20px rgba(15,23,42,.1), inset 0 1px 0 rgba(255,255,255,.95);
}
.popup-app-label { width:100%; color:#20283a; font-size:12px; font-weight:650; line-height:1.25; text-align:center; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

@media (max-width: 768px) {
    .apple-homepage { padding:24px 0 96px; }
    .apple-container { padding:0 15px; }
    .wotd-card-wrapper { grid-template-columns:1fr; gap:14px; }
    .wotd-content { padding:18px; border-radius:22px; }
    .hero-side-banner { min-height:unset; height:auto; padding:22px; border-radius:22px; }
    .apple-apps-flexible-grid { gap:18px 14px; }
    .apple-app-icon-item { width:76px; }
    .app-icon-box { width:62px; height:62px; border-radius:18px; }
    .app-icon-box svg { width: 26px; height: 26px; }
}
