/* LAYPASS.COM - PUBLIC PORTAL STYLES */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --bg-main: #0b0f19;
    --bg-card: #111827;
    --bg-card-hover: #1f2937;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: #3b82f6;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #60a5fa;
    --accent: #10b981;
    --accent-glow: rgba(16, 185, 129, 0.2);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-sub: #64748b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* NAVBAR */
.navbar {
    border-bottom: 1px solid var(--border-color);
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(12px);
    z-index: 50;
    padding: 16px 0;
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 800;
    font-size: 20px;
}

.logo-badge {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* HERO SECTION */
.hero {
    padding: 60px 0 40px;
    text-align: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 999px;
    color: var(--primary-light);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-title span {
    background: linear-gradient(135deg, #60a5fa, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 36px;
}

/* SEARCH BOX */
.search-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 680px;
    margin: 0 auto;
    box-shadow: var(--shadow-card);
}

.search-form {
    display: flex;
    gap: 12px;
}

.search-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
    display: block;
    min-width: 0;
}

.search-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.search-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 0 28px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.sample-files-box {
    margin-top: 20px;
    text-align: left;
}

.sample-title {
    font-size: 12px;
    color: var(--text-sub);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.sample-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sample-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.15s;
}

.sample-chip:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--border-focus);
    color: #fff;
}

/* TASK GUIDANCE CARD (Light & High Contrast) */
.guide-card {
    display: none;
    background: #ffffff;
    color: #1e293b;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    max-width: 680px;
    margin: 30px auto 0;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.12);
    text-align: left;
    animation: guideCardSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes guideCardSlide {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.guide-card-header {
    border-bottom: 1.5px solid #f1f5f9;
    padding-bottom: 16px;
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.guide-card-title {
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.3px;
    margin: 0;
}

.guide-card-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-top: 3px;
}

.guide-highlight-file {
    color: #b91c1c;
    font-weight: 700;
    word-break: break-all;
}

.step-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 22px;
}

.step-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 6px;
}

.step-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
    margin-top: 1px;
}

.step-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.step-content {
    width: 100%;
    margin-left: 0;
    padding-left: 0;
}

.step-content p {
    color: #475569;
    font-size: 13.5px;
    line-height: 1.5;
    margin: 0;
}

.guide-link-google {
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: underline;
}

.keyword-box {
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.keyword-text {
    color: #dc2626;
    font-weight: 800;
    font-size: 15px;
    word-break: break-word;
}

.copy-btn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

/* GOOGLE SERP SCREENSHOT MOCKUP (Light Style) */
.google-screenshot-box {
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 10px;
    box-shadow: 0 1px 6px rgba(60, 64, 67, 0.1);
    user-select: none;
}

.google-screenshot-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.google-screenshot-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f5f9;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.google-screenshot-meta {
    display: flex;
    flex-direction: column;
}

.google-screenshot-site {
    font-size: 13.5px;
    font-weight: 600;
    color: #202124;
    line-height: 1.2;
}

.google-screenshot-url {
    font-size: 11.5px;
    color: #5f6368;
    font-family: inherit;
}

.google-screenshot-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a0dab;
    margin: 4px 0 3px;
    line-height: 1.3;
    cursor: pointer;
}

.google-screenshot-title:hover {
    text-decoration: underline;
}

.google-screenshot-desc {
    font-size: 12px;
    color: #4d5156;
    line-height: 1.4;
}

/* HIGHLIGHT LABELS */
.guide-highlight-btn {
    color: #0369a1;
    background: #e0f2fe;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.guide-highlight-cd {
    color: #dc2626;
    font-size: 15px;
    font-weight: 800;
}

a.guide-highlight-cd {
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s, opacity 0.2s;
}

a.guide-highlight-cd:hover {
    color: #b91c1c;
    opacity: 0.85;
}

/* NOTICE / TIPS BOX */
.guide-note-section {
    margin: 16px 0 0 0;
    padding-top: 10px;
    border-top: 2px solid #d2d2d2;
}

.guide-note-title {
    font-weight: bold;
    font-size: 16px;
    color: #3b3b3b;
    margin-bottom: 4px;
}

.guide-note-list {
    margin: 0 0 0 20px;
    padding: 0;
    font-size: 13.5px;
    color: #333333;
    line-height: 1.5;
}

/* FOOTER */
.footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding: 28px 0;
    text-align: center;
    color: var(--text-sub);
    font-size: 13px;
}

/* TOP 10 CHIPS & BADGES */
.chip-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}
.chip-count {
    font-size: 11px;
    color: #f59e0b;
    font-weight: 700;
    margin-left: 6px;
    background: rgba(245, 158, 11, 0.15);
    padding: 2px 6px;
    border-radius: 6px;
}
.btn-all-files {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-all-files:hover {
    background: rgba(56, 189, 248, 0.25);
    transform: translateY(-1px);
}

/* SEARCH INPUT WRAPPER — ensures suggest dropdown anchors correctly */
.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
}

/* AUTO-SUGGEST DROPDOWN */
.suggest-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #111827;
    border: 1px solid rgba(59, 130, 246, 0.45);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.8);
    z-index: 9000;
    max-height: 320px;
    overflow-y: auto;
    animation: suggestFadeIn 0.15s ease-out;
}
@keyframes suggestFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.suggest-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s;
}
.suggest-item:last-child {
    border-bottom: none;
}
.suggest-item:hover, .suggest-item.active {
    background: rgba(37, 99, 235, 0.25);
}
.suggest-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}
.suggest-file {
    font-size: 11px;
    color: #38bdf8;
    font-family: 'JetBrains Mono', monospace;
    margin-top: 2px;
}
.suggest-stats {
    font-size: 11px;
    color: var(--text-sub);
    text-align: right;
}

/* MODAL OVERLAY & CARD */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}
.modal-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.modal-close:hover {
    color: #fff;
}
.modal-body {
    padding: 12px 24px 24px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.file-list-item {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
}
.file-list-item:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.4);
    transform: translateX(4px);
}

/* ==========================================================================
   MOBILE RESPONSIVE STYLES (Screen <= 640px)
   ========================================================================== */
@media (max-width: 640px) {
    .container {
        padding: 0 10px;
    }

    .hero {
        padding: 28px 0 20px;
    }

    .hero-title {
        font-size: 24px;
        letter-spacing: -0.5px;
        margin-bottom: 12px;
    }

    .hero-desc {
        font-size: 13.5px;
        margin-bottom: 20px;
    }

    .search-card {
        padding: 16px 12px;
        border-radius: var(--radius-lg);
    }

    .search-form {
        flex-direction: column;
        gap: 10px;
    }

    .search-btn {
        width: 100%;
        padding: 12px;
        justify-content: center;
    }

    /* Guide card full width & compact padding on mobile */
    .guide-card, #guide-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 16px 12px !important;
        margin: 20px 0 0 0 !important;
        border-radius: 14px !important;
        box-sizing: border-box !important;
    }

    .guide-card-header {
        margin-bottom: 14px;
        padding-bottom: 10px;
    }

    .guide-card-title {
        font-size: 16px;
    }

    .guide-card-subtitle {
        font-size: 12px;
    }

    .step-item {
        margin-bottom: 18px;
    }

    /* .step-number và h4 trên cùng 1 hàng, h4 tự xuống dòng nếu dài */
    .step-header {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 6px;
    }

    .step-header h4 {
        font-size: 14.5px;
        line-height: 1.35;
        flex: 1;
        min-width: 0;
        word-break: break-word;
    }

    .step-number {
        width: 24px;
        height: 24px;
        font-size: 12.5px;
        border-radius: 6px;
        flex-shrink: 0;
        margin-top: 1px;
    }

    /* .step-content ở dưới, canh lề trái ngang với .step-number */
    .step-content {
        width: 100%;
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    .step-content p {
        font-size: 13px;
        line-height: 1.45;
    }

    /* btn-copy-keyword nằm dưới keyword-text trên mobile */
    .keyword-box {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px;
    }

    .keyword-text {
        text-align: center;
        font-size: 14px;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .copy-btn, #btn-copy-keyword {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 9px 12px;
        font-size: 12.5px;
    }

    .google-screenshot-box {
        padding: 10px 12px;
    }

    .google-screenshot-title {
        font-size: 14px;
    }

    .guide-note-section {
        margin-top: 14px;
        padding-top: 10px;
    }

    .guide-note-title {
        font-size: 14px;
    }

    .guide-note-list {
        font-size: 12.5px;
        margin-left: 16px;
    }
}
