/* ===== ตัวแปรธีม Glassmorphism (ค่าเริ่มต้น = ส้ม-ขาว หน้าแรก) ===== */
:root {
    --orange-50: #fff7ed;
    --orange-100: #ffedd5;
    --orange-200: #fed7aa;
    --orange-400: #fb923c;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --orange-700: #c2410c;
    --white: #ffffff;
    --brand-primary: #f97316;
    --brand-primary-dark: #ea580c;
    --brand-accent: #fb923c;
    --bg-gradient: linear-gradient(145deg, #fff7ed 0%, #fff 35%, #ffedd5 70%, #fed7aa 100%);
    --blob-1: #fb923c;
    --blob-2: #f97316;
    --blob-3: #fed7aa;
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-bg-strong: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.75);
    --glass-shadow: 0 8px 32px rgba(249, 115, 22, 0.12);
    --btn-gradient: linear-gradient(135deg, #f97316, #ea580c);
    --btn-shadow: 0 4px 16px rgba(234, 88, 12, 0.35);
    --text-dark: #431407;
    --text-muted: #9a3412;
    --icon-bg: linear-gradient(135deg, #f97316, #ea580c);
    --icon-glow: 0 0 32px rgba(249, 115, 22, 0.35);
    --radius-lg: 20px;
    --radius-xl: 28px;
    --font: 'IBM Plex Sans Thai', system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--text-dark);
    min-height: 100vh;
    background: var(--bg-gradient);
    overflow-x: hidden;
    transition: background 0.6s ease;
}

/* พื้นหลัง blob สีส้มนุ่ม */
.bg-blobs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    animation: float 12s ease-in-out infinite;
}

.blob-1 {
    width: 420px;
    height: 420px;
    background: var(--blob-1);
    top: -120px;
    right: -80px;
}

.blob-2 {
    width: 360px;
    height: 360px;
    background: var(--blob-2);
    bottom: 10%;
    left: -100px;
    animation-delay: -4s;
}

.blob-3 {
    width: 280px;
    height: 280px;
    background: var(--blob-3);
    top: 45%;
    right: 20%;
    animation-delay: -8s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -15px) scale(1.05); }
}

/* Glass utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
}

.glass-bar {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.glass-btn {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1.5px solid var(--brand-accent);
    color: var(--text-on-glass, var(--text-dark));
    font-family: var(--font);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: var(--glass-shadow);
    transform: translateY(-1px);
}

.main-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* Header สำหรับหน้าย่อย */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-link {
    display: block;
    line-height: 0;
}

.logo-img {
    height: 48px;
    width: auto;
}

.btn-howto {
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-size: 0.95rem;
}

/* Modal วิธีใช้งาน */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(67, 20, 7, 0.35);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1rem;
}

.modal-overlay[hidden] {
    display: none;
}

.modal {
    max-width: 420px;
    width: 100%;
    padding: 2rem;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal.glass-panel {
    background: rgba(255, 255, 255, 0.95);
}

.modal h2 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: #1c1917;
    font-weight: 700;
}

.howto-list {
    padding-left: 1.25rem;
    line-height: 1.8;
    color: #292524;
    font-weight: 500;
}

.howto-list strong {
    color: #1c1917;
}

.howto-list li {
    margin-bottom: 0.5rem;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--brand-primary-dark, var(--brand-primary));
    font-weight: 600;
    text-decoration: none;
}

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

.breadcrumb svg {
    width: 16px;
    height: 16px;
}

/* ปุ่มหลัก */
.btn-primary {
    background: var(--btn-gradient);
    color: var(--white);
    border: none;
    font-family: var(--font);
    font-weight: 600;
    padding: 0.85rem 1.5rem;
    border-radius: 14px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: var(--btn-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Input */
.glass-input {
    flex: 1;
    min-width: 0;
    padding: 0.85rem 1.1rem;
    border-radius: 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 500;
    color: #1c1917;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.glass-input::placeholder {
    color: #78716c;
    font-weight: 400;
}

/* input บนหน้าพื้นเข้ม */
.page-netflix .glass-input,
.page-disney .glass-input {
    color: #1c1917;
    background: rgba(255, 255, 255, 0.95);
}

.page-netflix .glass-input::placeholder,
.page-disney .glass-input::placeholder {
    color: #57534e;
}

.glass-input:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 25%, transparent);
}

/* โลโก้แอป */
.service-logo,
.app-logo-img {
    display: block;
    object-fit: contain;
}

.service-logo {
    width: 72%;
    max-width: 88px;
    height: auto;
    max-height: 52px;
}

.app-logo-img {
    width: 64px;
    height: 64px;
}

/* Responsive */
@media (max-width: 640px) {
    .site-header {
        padding: 0.75rem 1rem;
    }

    .logo-img {
        height: 40px;
    }
}
