/* =====================================================================
   Deal Hời – stylesheet
   ===================================================================== */

:root {
    --primary: #ff4d2d;
    --primary-dark: #e8431f;
    --secondary: #ff8a3d;
    --accent: #ffd166;
    --success: #22c993;
    --info: #4b7bec;
    --pink: #ff5e94;
    --dark: #2a2545;
    --muted: #6c757d;
    --bg-from: #ffe8d6;
    --bg-mid: #ffd8c2;
    --bg-to: #ffc4ad;
    --shadow-soft: 0 18px 50px rgba(255, 77, 45, 0.18);
    --shadow-card: 0 24px 60px rgba(63, 41, 26, 0.16);
}

* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }

html, body { height: 100%; }

body {
    font-family: 'Be Vietnam Pro', 'Segoe UI', Tahoma, sans-serif;
    color: var(--dark);
    background:
        radial-gradient(circle at 12% 18%, #ffd6c2 0%, transparent 38%),
        radial-gradient(circle at 88% 12%, #ffe1a8 0%, transparent 42%),
        radial-gradient(circle at 50% 95%, #ffc8e0 0%, transparent 45%),
        linear-gradient(135deg, var(--bg-from) 0%, var(--bg-mid) 55%, var(--bg-to) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ----- floating background decorations --------------------------------- */
.bg-decor { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    animation: float 14s ease-in-out infinite;
}
.blob-1 { width: 320px; height: 320px; left: -80px; top: -60px;
    background: radial-gradient(circle, #ff8a3d, transparent 70%); animation-delay: 0s; }
.blob-2 { width: 380px; height: 380px; right: -100px; top: 10%;
    background: radial-gradient(circle, #ffd166, transparent 70%); animation-delay: -3s; }
.blob-3 { width: 420px; height: 420px; left: 30%; bottom: -160px;
    background: radial-gradient(circle, #ff5e94, transparent 70%); animation-delay: -6s; }

@keyframes float {
    0%,100% { transform: translateY(0) translateX(0) scale(1); }
    50%     { transform: translateY(-30px) translateX(20px) scale(1.06); }
}

.sparkle {
    position: absolute; color: rgba(255, 255, 255, 0.85); font-size: 1.25rem;
    text-shadow: 0 6px 18px rgba(255, 77, 45, 0.35);
    animation: pop 6s ease-in-out infinite;
}
.sparkle.s-1 { top: 12%; left: 10%; animation-delay: 0s; }
.sparkle.s-2 { top: 20%; right: 15%; animation-delay: -1.5s; }
.sparkle.s-3 { top: 60%; left: 8%;  animation-delay: -3s;  }
.sparkle.s-4 { top: 70%; right: 12%; animation-delay: -4.5s; }
.sparkle.s-5 { top: 40%; left: 50%;  animation-delay: -2s;  }

@keyframes pop {
    0%,100% { transform: scale(1) rotate(0deg);  opacity: 0.8; }
    50%     { transform: scale(1.35) rotate(15deg); opacity: 1; }
}

/* ----- layout --------------------------------------------------------- */
.container {
    position: relative; z-index: 1;
    max-width: 720px; padding: 1rem;
}

/* ----- hero ----------------------------------------------------------- */
.hero { text-align: center; padding: 1.75rem 0 1.25rem; color: var(--dark); }

.hero-logo {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.4rem 1.1rem 0.4rem 0.5rem;
    background: rgba(255,255,255,0.55);
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}
.logo-icon {
    width: 42px; height: 42px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white; display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(255, 77, 45, 0.45);
    font-size: 1.1rem;
    animation: spin-slow 6s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

.hero h1 {
    font-size: 1.75rem; font-weight: 800; margin: 0;
    background: linear-gradient(90deg, var(--primary), var(--pink) 60%, var(--secondary));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    letter-spacing: -0.01em;
}
.hero-sub {
    margin: 0.85rem auto 0.6rem; max-width: 520px;
    color: #5b4733; font-weight: 500;
}
.hero-badges { display: inline-flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }

.domain-badge {
    background: rgba(255, 255, 255, 0.7);
    color: var(--dark);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    backdrop-filter: blur(6px);
}
.domain-badge.accent {
    background: linear-gradient(135deg, var(--success), #1aa172);
    color: white;
}

/* ----- main card ------------------------------------------------------ */
.main-card {
    position: relative;
    background: white;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.card-glow {
    position: absolute; inset: -2px;
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--pink));
    opacity: 0.6;
    border-radius: 1.5rem;
    z-index: -1;
    filter: blur(18px);
}

.card-content { padding: 1.75rem 1.4rem 1.4rem; }

.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-weight: 600; color: var(--dark); margin-bottom: 0.5rem; font-size: 0.95rem; }

.input-wrap {
    position: relative; display: flex; align-items: stretch;
    border: 2px solid #ffe1d4;
    border-radius: 0.9rem;
    overflow: hidden;
    background: #fff;
    transition: all 0.25s ease;
}
.input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.18rem rgba(255, 77, 45, 0.15);
}
.input-wrap .form-control {
    border: none; padding: 0.85rem 1rem;
    font-size: 0.98rem;
    background: transparent;
}
.input-wrap .form-control:focus { box-shadow: none; }

.paste-btn {
    border: none; background: linear-gradient(135deg, #fff5ef, #ffe6d8);
    color: var(--primary); padding: 0 1rem;
    cursor: pointer; transition: all 0.2s ease;
    border-left: 1px solid #ffe1d4;
    font-size: 0.95rem;
}
.paste-btn:hover { background: var(--primary); color: white; }
.paste-btn:active { transform: scale(0.96); }

.form-hint { display: block; margin-top: 0.4rem; color: var(--muted); font-size: 0.8rem; }

/* ----- CTA button ----------------------------------------------------- */
.btn-cta {
    position: relative;
    width: 100%;
    border: none;
    border-radius: 0.9rem;
    padding: 0.95rem 1rem;
    font-size: 1.02rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 12px 28px rgba(255, 77, 45, 0.35);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(255, 77, 45, 0.45); }
.btn-cta:active { transform: translateY(0); }
.btn-cta:disabled { opacity: 0.7; cursor: progress; }

.btn-shine {
    position: absolute; top: 0; left: -120%;
    width: 60%; height: 100%;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.55) 50%, transparent 70%);
    transform: skewX(-25deg);
    transition: left 0.6s ease;
}
.btn-cta:hover .btn-shine { left: 130%; }

.spinner {
    display: none;
    width: 1.1rem; height: 1.1rem;
    border: 3px solid rgba(255,255,255,0.35);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 0.55rem;
    vertical-align: middle;
}
.spinner.show { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- result section ------------------------------------------------- */
.result-section { display: none; margin-top: 1.25rem; }
.result-section.show { display: block; animation: slideIn 0.35s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.link-box {
    background: linear-gradient(135deg, #fff8f3 0%, #ffeede 100%);
    border: 2px solid #ffd0b9;
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
    word-break: break-all;
    font-size: 0.875rem;
    color: #2a2545;
}
.link-box:last-child { margin-bottom: 0; }
.link-box-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.4rem; gap: 0.5rem;
}
.link-box-header strong { font-size: 0.9rem; color: var(--primary-dark); }

.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.55rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.copy-btn:hover { background: var(--secondary); transform: scale(1.04); }

/* ----- action buttons ------------------------------------------------- */
.action-buttons {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem;
    margin-top: 0.85rem;
}
.btn-action {
    display: flex; align-items: center; justify-content: center;
    border-radius: 0.85rem;
    padding: 0.85rem 1rem;
    font-weight: 700;
    color: white !important;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-action:hover { transform: translateY(-2px); }
.btn-buy   { background: linear-gradient(135deg, var(--success), #1aa172);
            box-shadow: 0 12px 24px rgba(34, 201, 147, 0.35); }
.btn-share { background: linear-gradient(135deg, var(--info), #3867d6);
            box-shadow: 0 12px 24px rgba(75, 123, 236, 0.35); }
.btn-buy:hover   { box-shadow: 0 18px 32px rgba(34, 201, 147, 0.45); }
.btn-share:hover { box-shadow: 0 18px 32px rgba(75, 123, 236, 0.45); }

/* ----- product info box ---------------------------------------------- */
.product-info-box {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fc 0%, #eef1f7 100%);
    border: 1px solid #e1e6ef;
    border-radius: 1rem;
    display: none;
}
.product-info-box.show { display: block; animation: slideIn 0.35s ease; }
.product-info-header {
    display: flex; align-items: center; margin-bottom: 0.85rem;
    padding-bottom: 0.6rem; border-bottom: 2px solid #dfe4ee;
}
.product-info-header h6 { margin: 0; color: var(--primary); font-weight: 700; }

.product-row { display: flex; align-items: flex-start; gap: 0.85rem; }
.product-image {
    width: 96px; height: 96px; object-fit: cover;
    border-radius: 0.6rem; border: 2px solid #e1e6ef;
    background: #fff;
    flex-shrink: 0;
}
.product-details { flex: 1; min-width: 0; }
.product-name {
    font-weight: 600; font-size: 0.92rem; line-height: 1.35;
    color: var(--dark); margin-bottom: 0.4rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-shop { color: var(--muted); font-size: 0.82rem; margin-bottom: 0.25rem; }
.product-price { color: var(--primary); font-weight: 800; font-size: 1.2rem; }

.product-stats {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; margin-top: 0.85rem;
}
.stat-item {
    background: white; padding: 0.55rem; border-radius: 0.6rem;
    text-align: center; border: 1px solid #e1e6ef;
}
.stat-label { font-size: 0.72rem; color: var(--muted); margin-bottom: 0.2rem; }
.stat-value { font-weight: 700; color: var(--dark); font-size: 0.95rem; }

/* ----- instructions --------------------------------------------------- */
.instructions-box {
    margin: 0 1.4rem 1.4rem;
    background: linear-gradient(135deg, #fff8e3 0%, #fff1d2 100%);
    border-left: 4px solid var(--accent);
    border-radius: 0.9rem;
    padding: 1rem 1.1rem;
}
.instructions-box h6 {
    font-weight: 700; margin-bottom: 0.75rem; color: #8a5a00;
    font-size: 0.95rem;
}
.steps { list-style: none; padding: 0; margin: 0; }
.steps li {
    display: flex; align-items: flex-start; gap: 0.7rem;
    margin-bottom: 0.6rem; font-size: 0.92rem; color: #4d3a1f;
}
.steps li:last-child { margin-bottom: 0; }
.step-num {
    flex-shrink: 0;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white; font-weight: 700; font-size: 0.82rem;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(255, 77, 45, 0.35);
}

/* ----- features grid -------------------------------------------------- */
.features {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem;
    margin: 1.5rem 0 1rem;
}
.feature {
    background: rgba(255,255,255,0.85);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 12px 28px rgba(63, 41, 26, 0.08);
    backdrop-filter: blur(6px);
    transition: transform 0.25s ease;
}
.feature:hover { transform: translateY(-4px); }
.f-icon {
    width: 44px; height: 44px; border-radius: 0.75rem;
    color: white; display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 0.5rem; font-size: 1.05rem;
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}
.f-icon.green  { background: linear-gradient(135deg, #22c993, #1aa172); }
.f-icon.orange { background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.f-icon.blue   { background: linear-gradient(135deg, #4b7bec, #3867d6); }
.f-icon.pink   { background: linear-gradient(135deg, #ff5e94, #ff7eb3); }
.f-title { font-weight: 700; margin-bottom: 0.25rem; font-size: 0.95rem; }
.f-desc  { font-size: 0.83rem; color: var(--muted); line-height: 1.45; }

/* ----- footer --------------------------------------------------------- */
.footer {
    text-align: center; padding: 1.5rem 0 2rem;
    color: rgba(63, 41, 26, 0.75);
    font-size: 0.85rem;
}
.footer-sub { margin-top: 0.25rem; font-size: 0.78rem; opacity: 0.85; }

/* ----- responsive ----------------------------------------------------- */
@media (max-width: 576px) {
    .hero h1 { font-size: 1.45rem; }
    .hero-sub { font-size: 0.92rem; }
    .card-content { padding: 1.25rem 1rem 1rem; }
    .instructions-box { margin: 0 1rem 1rem; padding: 0.85rem; }
    .action-buttons { grid-template-columns: 1fr; }
    .features { grid-template-columns: 1fr; }
    .product-image { width: 80px; height: 80px; }
}
