body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background: #eef2f5;
    color: #2e2e2e;
}

/* NAV BAR - Unchanged as requested */
nav {
    background: #ffffff;
    padding: 10px 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav-left {
    display: flex;
    align-items: center;
    position: absolute;
    left: 30px;
}

.nav-left img {
    height: 40px;
    margin-right: 10px;
}

.logo-link {
    text-decoration: none;
}

.logo-text {
    font-weight: 700;
    font-size: 20px;
    color: #4a90e2;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.nav-right {
    display: flex;
    gap: 25px;
}

.nav-right a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
    cursor: pointer;
}

.nav-right a:hover {
    color: #4a90e2;
}

.nav-right .active-link {
    color: #4a90e2;
}


/* MODERN UPDATED STYLES BELOW */

.container {
    padding: 5px 5px;
    max-width: 95%;
    margin: 1px auto 0 auto; /* 40px top margin */
    overflow-y: auto;
}


.similarity-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1px;
    margin-top: 1px;
    height: 100%; /* optional for height control */
}

/* .similarity-container .section {
    flex: 1;
} */


.section {
    display: none;
    background: #ffffff;
    padding: 30px 35px;
    border-radius: 18px;
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.05),
        0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.active {
    display: block;
}


form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

input[type="file"],
input[type="text"] {
    padding: 10px 12px;
    border: none;
    background: #f0f3f7;
    border-radius: 10px;
    font-size: 16px;
    transition: box-shadow 0.2s ease;
    box-shadow: inset 2px 2px 5px #d1d9e6, inset -2px -2px 5px #ffffff;
}

input[type="file"]:focus,
input[type="text"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px #4a90e2;
}

button {
    padding: 14px;
    border: none;
    color: white;
    font-weight: 600;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
}

#preview {
    text-align: center;
}

#preview img {
    max-width: 100%;
    border: 2px dashed #c3cfe2;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

#similarity-preview {
    margin-top: 20px;
    text-align: center;
}

#similarity-preview img {
    max-width: 100%;
    /* border: 2px dashed #c3cfe2; */
    /* padding: 10px; */
    /* border-radius: 10px; */
    background: #ffffff;
    /* box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04); */
}

#similarity-button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 55px; /* Adjust this height based on your layout */
}

#recommend-button {
    display: none;
    padding: 14px 24px;
    background: linear-gradient(135deg, #4a90e2, #357ab8);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#recommend-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
}

/* @media (max-width: 768px) {
    #lookalikes div {
        flex-direction: column;
        align-items: center;
    }
} */


/* Home page */
.home-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 30px 80px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.hero-panel {
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}

.hero-panel h1 {
    margin: 0 0 12px 0;
    font-size: 36px;
    font-weight: 700;
    color: #1f2a44;
}

.hero-panel p {
    margin: 0;
    font-size: 18px;
    color: #4a5468;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 26px;
}

.feature-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 26px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow:
        0 12px 30px rgba(15, 23, 42, 0.08),
        0 4px 10px rgba(15, 23, 42, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 18px 36px rgba(15, 23, 42, 0.12),
        0 6px 16px rgba(15, 23, 42, 0.08);
}

.feature-card__header {
    display: flex;
    justify-content: flex-start;
}

.feature-card__tag {
    display: inline-block;
    padding: 4px 10px;
    background: #eef4ff;
    color: #1d4ed8;
    font-weight: 600;
    font-size: 12px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.feature-card h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.feature-card p {
    margin: 0;
    color: #4b5563;
    font-size: 15px;
    flex: 1;
}

.feature-card__cta {
    font-weight: 700;
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.feature-card__cta::after {
    content: '→';
    font-size: 14px;
}


/* Generic page shell */
.page-wrapper {
    margin: 0 auto;
    padding: 40px 30px 80px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.page-heading h1 {
    margin: 0 0 8px 0;
    font-size: 32px;
    color: #1f2a44;
}

.page-heading p {
    margin: 0;
    font-size: 16px;
    color: #4a5468;
    max-width: 720px;
}

.layout-stack {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card-panel {
    background: #ffffff;
    border-radius: 18px;
    padding: 30px;
    box-shadow:
        0 12px 30px rgba(15, 23, 42, 0.08),
        0 4px 10px rgba(15, 23, 42, 0.05);
}

.card-panel h2 {
    margin: 0 0 6px 0;
    font-size: 22px;
    color: #111827;
}

.card-panel__subtitle {
    margin: 0 0 18px 0;
    color: #4b5563;
    font-size: 15px;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.input-label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.primary-btn,
.danger-btn {
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.primary-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
}

.danger-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
}

.primary-btn:hover,
.danger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.danger-btn:hover {
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.25);
}

.lookalikes-stage {
    min-height: 480px;
    position: relative;
}

.lookalikes-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lookalikes-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.lookalikes-toolbar button {
    padding: 10px 18px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.lookalikes-toolbar button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

.lookalikes-seed {
    display: flex;
    gap: 18px;
    align-items: center;
    background: #ffffff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.lookalikes-seed img {
    width: 96px;
    height: 96px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.lookalikes-seed__meta h3 {
    margin: 0;
    font-size: 20px;
    color: #111827;
}

.lookalikes-seed__meta p {
    margin: 4px 0 0;
    font-size: 14px;
    color: #4a5568;
}

.lookalikes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.lookalike-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    text-align: left;
}

.lookalike-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.lookalike-card__image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lookalike-card__image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lookalike-card__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lookalike-card__id {
    font-weight: 600;
    color: #1f2937;
}

.lookalike-card__score {
    font-size: 12px;
    font-weight: 600;
    color: #1d4ed8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lookalikes-empty,
.lookalikes-error {
    padding: 18px;
    border-radius: 14px;
    background: #f8fafc;
    text-align: center;
    color: #475569;
    font-size: 14px;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
}

.classifier-wrapper {
    min-height: calc(100vh - 120px);
    padding: 60px 80px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.95));
}

.classifier-header {
    margin-bottom: 30px;
}

.classifier-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.classifier-header h1 {
    margin: 0 0 10px;
    font-size: 32px;
    color: #111827;
}

.classifier-header p {
    margin: 0;
    color: #475569;
    font-size: 16px;
}

.classifier-search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 999px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.classifier-search input[type="text"] {
    border: none;
    outline: none;
    font-size: 14px;
    min-width: 220px;
}

.classifier-search button {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 8px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.classifier-search button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.classifier-search .search-reset {
    color: #6b7280;
    font-weight: 600;
    text-decoration: none;
}

.classifier-search .search-reset:hover {
    color: #4b5563;
    text-decoration: underline;
}

.classifier-table {
    overflow-x: auto;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.classifier-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.classifier-table thead th {
    position: sticky;
    top: 0;
    background: #f1f5f9;
    color: #1f2937;
    text-align: left;
    padding: 14px 16px;
    font-weight: 600;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    white-space: nowrap;
}

.classifier-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    color: #374151;
    vertical-align: top;
    white-space: normal;
}

.classifier-table tbody td.image-cell {
    width: 110px;
    white-space: nowrap;
}

.classifier-table tbody td.description-cell {
    white-space: pre-wrap;
    line-height: 1.5;
    max-width: 520px;
}

.classifier-table tbody td img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.classifier-table tbody td a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.classifier-table tbody td a:hover {
    text-decoration: underline;
}

.classifier-table tbody tr:nth-child(odd) {
    background: rgba(241, 245, 249, 0.5);
}

.classifier-table tbody tr:hover {
    background: rgba(191, 219, 254, 0.3);
}

.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 0 4px;
}

.pagination-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pagination-link {
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.18s ease;
}

.pagination-link:hover {
    color: #1d4ed8;
}

.pagination-link.disabled {
    color: #9ca3af;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .classifier-wrapper {
        padding: 40px 24px;
    }

    .classifier-search {
        width: 100%;
        justify-content: space-between;
        padding: 10px 16px;
    }

    .classifier-search input[type="text"] {
        flex: 1 1 auto;
        min-width: 160px;
    }

    .classifier-table table {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .nav-right {
        flex-wrap: wrap;
        gap: 12px;
    }

    .home-wrapper {
        padding: 40px 18px 60px;
    }

    .feature-card {
        padding: 22px;
    }

    .page-wrapper {
        padding: 30px 18px 60px;
    }

    .classifier-header__top {
        flex-direction: column;
        align-items: stretch;
    }

    .classifier-search {
        flex-wrap: wrap;
        gap: 10px;
        border-radius: 16px;
    }
}
