/* 
   LayLink Pro - Modern SaaS UI Redesign
   Senior UI/UX Design Standards
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #ff4d2d;
    --primary-dark: #e6391d;
    --primary-soft: #fff1f0;
    --success: #26aa99;
    --fb-blue: #1877f2;
    --bg: #fff0ed; /* Màu nền hồng nhạt đào */
    --card: #ffffff;
    --text-main: #333333;
    --text-muted: #777777;
    --border: #f0f0f0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 4px 8px rgba(0, 0, 0, 0.02);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 460px;
    padding: 24px 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header Section */
.header {
    text-align: center;
    margin-bottom: 8px;
}

.header h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    margin-bottom: 2px;
}

.header h1 i {
    margin-right: 8px;
}

.header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Card Base */
.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* Form Section */
.form-card {
    border-top: 5px solid var(--primary);
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 12px;
}

.input-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 45px 16px 45px;
    background: #f9fafb;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-size: 15px;
    outline: none;
    transition: all 0.3s;
}

.input-wrapper input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.btn-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #d1d5db;
    font-size: 18px;
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    height: 52px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s, opacity 0.2s;
}

.btn-primary:active { transform: scale(0.98); }

/* Trust Section */
.trust-section {
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.trust-item i {
    font-size: 16px;
    color: var(--primary);
}

.trust-item span {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
}

/* Result Section */
.result-section {
    display: none;
    animation: slideInUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card {
    border: 1px solid var(--primary);
    padding: 16px;
}

.result-title {
    color: #26aa99;
}

.result-title i {
    font-size: 10px;
    margin-right: 4px;
}

/* Guide Card - Blue Style */
.guide-card {
    background: #f4f8fb;
    border: 1px solid #e1e9f0;
}

.guide-header h3 {
    color: #1877f2;
}

.step-num {
    background: #fff;
    color: var(--primary);
    border: 1px solid #ffebeb;
}

.link-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
    overflow-x: hidden;
}

.link-box code {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: #334155;
    word-break: break-all;
    display: block;
}

.btn-copy {
    width: 100%;
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-action {
    border: none;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: white;
}

.btn-buy { background: #26aa99; }
.btn-comment { background: var(--fb-blue); }

/* Guide Card */
.guide-card {
    background: #fffcf0;
    border: 1px solid #ffeeba;
}

.guide-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.guide-icon {
    width: 32px;
    height: 32px;
    background: #fff3cd;
    color: #856404;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-header h3 {
    font-size: 16px;
    color: #856404;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step-item {
    display: flex;
    gap: 14px;
}

.step-num {
    width: 28px;
    height: 28px;
    background: white;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.step-content {
    font-size: 14px;
    color: #856404;
    font-weight: 500;
}

.step-content span {
    color: var(--primary);
    font-weight: 700;
}

.direct-link {
    display: block;
    margin-top: 6px;
    color: var(--fb-blue);
    text-decoration: underline;
    font-weight: 600;
}

/* Community Section */
.section-label {
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    color: #9ca3af;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.social-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.social-card:active { transform: translateX(4px); border-color: var(--primary); }

.social-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.social-icon.zalo { background: #eff6ff; }
.social-icon.facebook { background: #eff6ff; color: var(--fb-blue); }

.social-text {
    display: flex;
    flex-direction: column;
}

.social-name {
    font-size: 14px;
    font-weight: 700;
}

.social-desc {
    font-size: 11px;
    color: var(--text-muted);
}

.social-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-online {
    font-size: 10px;
    font-weight: 700;
    color: var(--success);
    background: #dcfce7;
    padding: 2px 6px;
    border-radius: 4px;
}

.social-meta i { font-size: 12px; color: #d1d5db; }

/* Accordion */
.accordion-group {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.accordion-btn {
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #fafafa;
}

.accordion-body {
    padding: 0 20px 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.accordion-group.active .accordion-content {
    max-height: 200px;
}

.accordion-group.active .arrow {
    transform: rotate(180deg);
}

.arrow { transition: transform 0.3s; }

/* Coupon Card */
.coupon-card {
    padding: 0;
    overflow: hidden;
    border: none;
}

.coupon-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #444;
}

.coupon-header i { color: var(--primary); }

.coupon-body {
    padding: 0 16px 16px;
}

.coupon-orange-bg {
    background: #ff6600;
    border-radius: 12px;
    padding: 10px;
}

.coupon-main {
    background: white;
    border-radius: 8px;
    display: flex;
    min-height: 100px;
}

.coupon-left {
    width: 80px;
    border-right: 1px dashed #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
}

.fb-icon-circle {
    width: 40px;
    height: 40px;
    background: var(--fb-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.coupon-left span { font-size: 10px; font-weight: 700; color: #ff3300; }

.coupon-right {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.coupon-value { font-size: 13px; font-weight: 700; color: #333; }
.coupon-cond { font-size: 11px; color: #666; }
.coupon-badge {
    align-self: flex-start;
    border: 1px solid #ff4d2d;
    color: #ff4d2d;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 2px;
}
.coupon-expiry { font-size: 9px; color: #999; margin-top: 4px; }
.footer {
    text-align: center;
    padding-top: 10px;
}

.footer p { font-size: 12px; color: var(--text-muted); }
.brand { color: var(--primary); font-weight: 800; }

/* Toast */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #111827;
    color: white;
    padding: 12px 20px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast i { color: #2ecc71; }

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none; }