

/* FindIt AI — Main Styles */

:root {
    --background: #f7f8fc;
    --surface: #ffffff;
    --primary: #6558e8;
    --primary-dark: #5043ce;
    --text: #20213a;
    --muted: #777b91;
    --border: #e9eaf2;
    --accent: #eeebff;
    --radius: 18px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
    border: none;
}

/* Navigation */

.navbar {
    min-height: 82px;
    padding: 18px 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary);
}

.navbar nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.navbar nav a {
    color: #656980;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
}

.navbar nav a:hover {
    color: var(--primary);
}

.nav-button,
#searchButton,
#createListingButton {
    background: var(--primary);
    color: white;
    border-radius: 11px;
    padding: 12px 20px;
    font-weight: 700;
    transition: background 0.2s, transform 0.2s;
}

.nav-button:hover,
#searchButton:hover,
#createListingButton:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Hero section */

.hero {
    padding: 100px 20px 86px;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 0%, #e9e6ff 0%, transparent 65%),
        var(--background);
}

.eyebrow {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: clamp(42px, 6vw, 70px);
    line-height: 1.12;
    letter-spacing: -3px;
    font-weight: 800;
}

.hero h1 span {
    color: var(--primary);
}

.hero-text {
    max-width: 580px;
    margin: 22px auto 30px;
    color: var(--muted);
    font-size: 17px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 620px;
    margin: 0 auto;
    padding: 8px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 15px;
    box-shadow: 0 12px 40px rgba(47, 42, 100, 0.07);
}

.search-box input {
    flex: 1;
    min-width: 0;
    padding: 12px 15px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
}

.search-box input::placeholder {
    color: #a1a3b3;
}

#searchButton {
    padding: 12px 25px;
}

.hero-note {
    margin-top: 18px;
    color: #898ca0;
    font-size: 12px;
}

/* Item listings */

.items-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 65px 24px 85px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.section-heading .eyebrow {
    margin-bottom: 6px;
}

.section-heading h2,
.report-section h2 {
    font-size: clamp(26px, 4vw, 36px);
    letter-spacing: -1px;
    line-height: 1.25;
}

#categoryFilter {
    padding: 12px 16px;
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 11px;
    outline-color: var(--primary);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* Future item cards */

.item-card {
    overflow: visible;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform 0.2s, box-shadow 0.2s;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(38, 34, 86, 0.08);
}

.item-card-content {
    padding: 20px;
}

.item-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

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

.item-tag {
    display: inline-block;
    padding: 5px 10px;
    margin-bottom: 12px;
    background: var(--accent);
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.empty-message {
    display: none;
    padding: 35px 10px;
    text-align: center;
    color: var(--muted);
}

/* Report section */

.report-section {
    margin: 0 7% 75px;
    padding: 60px 24px;
    text-align: center;
    background: #efedff;
    border: 1px solid #e4e0ff;
    border-radius: 24px;
}

.report-section h2 {
    margin-bottom: 14px;
}

.report-section > p:not(.eyebrow) {
    margin-bottom: 25px;
    color: var(--muted);
}

#createListingButton {
    padding: 14px 24px;
}

/* Footer */

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 35px 20px;
    background: white;
    border-top: 1px solid var(--border);
    text-align: center;
}

footer p {
    color: var(--muted);
    font-size: 13px;
}

/* Responsive layout */

@media (max-width: 800px) {
    .navbar {
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 18px 5%;
    }

    .navbar nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 22px;
        flex-wrap: wrap;
    }

    .items-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero {
        padding-top: 75px;
    }
}

@media (max-width: 540px) {
    .navbar {
        gap: 14px;
    }

    .logo {
        font-size: 22px;
    }

    .nav-button {
        padding: 10px 12px;
        font-size: 12px;
    }

    .navbar nav {
        gap: 16px;
    }

    .navbar nav a {
        font-size: 12px;
    }

    .hero {
        padding: 65px 18px;
    }

    .hero h1 {
        letter-spacing: -2px;
    }

    .hero-text {
        font-size: 15px;
    }

    .search-box {
        gap: 4px;
    }

    .search-box input {
        padding: 10px 8px;
        font-size: 13px;
    }

    #searchButton {
        padding: 11px 14px;
    }

    .items-section {
        padding: 45px 18px 60px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .items-grid {
        grid-template-columns: 1fr;
    }

    .report-section {
        margin: 0 18px 45px;
        padding: 42px 20px;
    }
}

/* Form and button improvements */

button,
.nav-button,
#searchButton,
#createListingButton,
#listingForm button[type="submit"] {
    min-height: 46px;
    border-radius: 12px;
    font-weight: 700;
    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(101, 88, 232, 0.35);
    outline-offset: 3px;
}

#searchButton,
#createListingButton,
#listingForm button[type="submit"] {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 5px 14px rgba(101, 88, 232, 0.18);
}

#searchButton:hover,
#createListingButton:hover,
#listingForm button[type="submit"]:hover {
    background: var(--primary-dark);
    box-shadow: 0 8px 20px rgba(101, 88, 232, 0.24);
}

#searchButton:active,
#createListingButton:active,
#listingForm button[type="submit"]:active {
    transform: scale(0.98);
}

/* Report form */

.report-section {
    scroll-margin-top: 24px;
}

#listingForm {
    width: 100%;
    max-width: 560px;
    margin: 30px auto 0;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(47, 42, 100, 0.07);
}

#listingForm label {
    margin-top: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

#listingForm input,
#listingForm select,
#listingForm textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #dedfec;
    border-radius: 11px;
    background: #fbfbfe;
    color: var(--text);
    font: inherit;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

#listingForm input::placeholder,
#listingForm textarea::placeholder {
    color: #9295a8;
}

#listingForm input:focus,
#listingForm select:focus,
#listingForm textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(101, 88, 232, 0.1);
}

#listingForm textarea {
    min-height: 110px;
    resize: vertical;
}

#listingForm button[type="submit"] {
    width: 100%;
    margin-top: 14px;
    padding: 13px 20px;
    font: inherit;
    cursor: pointer;
}

#formMessage {
    margin: 4px 0 0;
    color: var(--primary-dark);
    font-size: 14px;
    text-align: center;
}

/* Item cards */

.item-card {
    padding: 20px;
}

.item-card .item-icon {
    margin-bottom: 12px;
    font-size: 30px;
}

.item-status {
    display: inline-block;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    background: var(--accent);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
}

.item-status.found {
    background: #e5f8ee;
    color: #187447;
}

.item-status.lost {
    background: #fff0ed;
    color: #b64232;
}

.item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 14px 0;
    color: var(--muted);
    font-size: 12px;
}

.item-category {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 8px;
    background: #f2f1ff;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
}

/* Better mobile layout */

@media (max-width: 540px) {
    .navbar {
        padding: 14px 18px;
    }

    .navbar nav {
        justify-content: flex-start;
        gap: 18px;
    }

    .navbar nav a {
        font-size: 13px;
    }

    .hero {
        padding: 54px 18px 48px;
    }

    .hero h1 {
        font-size: clamp(38px, 10vw, 48px);
        line-height: 1.12;
        letter-spacing: -1.5px;
    }

    .search-box {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        gap: 8px;
    }

    .search-box input {
        width: 100%;
        min-height: 46px;
        padding: 12px;
        font-size: 16px;
    }

    #searchButton {
        width: 100%;
        min-height: 48px;
    }

    .section-heading {
        gap: 14px;
    }

    #categoryFilter {
        width: 100%;
        min-height: 46px;
    }

    .items-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .item-card {
        padding: 18px;
    }

    .report-section {
        margin: 0 12px 36px;
        padding: 32px 14px;
        border-radius: 20px;
    }

    #listingForm {
        padding: 20px 16px;
        gap: 9px;
        border-radius: 16px;
    }

    #listingForm label {
        margin-top: 7px;
    }

    #listingForm input,
    #listingForm select,
    #listingForm textarea {
        font-size: 16px;
    }

    footer {
        padding: 30px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Possible matching listings */

/* Possible matching listings */

.match-section {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid #e5e1ff;
    border-radius: 14px;
    background: #faf9ff;
}

.match-section h4 {
    margin: 0 0 12px;
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 800;
}

.match-card {
    margin-top: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.match-card:hover {
    border-color: #c9c2ff;
    box-shadow: 0 5px 15px rgba(101, 88, 232, 0.07);
}

.match-card strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text);
    font-size: 14px;
}

.match-card p {
    margin: 5px 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.match-card small {
    display: block;
    margin-top: 8px;
    color: #6256c9;
    font-size: 11px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.match-score {
    margin-top: 10px;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
}

.match-score-bar {
    width: 100%;
    height: 7px;
    margin: 7px 0 8px;
    overflow: hidden;
    border-radius: 10px;
    background: #e8e5fb;
}

.match-score-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8175f1, #6558e8);
    transition: width 0.3s ease;
}

.item-color {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 10px;
    border-radius: 8px;
    background: #f0edff;
    color: #6558e8;
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 540px) {
    .match-section {
        padding: 12px;
    }

    .match-card {
        padding: 12px;
    }
}

/* Image upload and preview */

#itemImage {
    padding: 10px;
    background: #fbfbfe;
    border: 1px dashed #c9c2ff;
    border-radius: 11px;
    cursor: pointer;
}

#imagePreviewContainer {
    display: none;
    margin-top: 10px;
    text-align: center;
}

#imagePreview {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #f7f8fc;
}

/* Photos displayed in item listings */

.item-photo {
    display: block;
    width: 100%;
    height: 190px;
    margin-bottom: 16px;
    object-fit: cover;
    border-radius: 12px;
    background: #f7f8fc;
}

#imagePreviewContainer {
    display: none;
    margin-top: 10px;
}

#imagePreview {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 12px;
}

#listingForm button[type="submit"]:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
/* Modern photo upload area */

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px 16px;
    margin-top: 8px;
    border: 2px dashed #c9c2ff;
    border-radius: 14px;
    background: #faf9ff;
    cursor: pointer;
    text-align: center;
    transition: 0.2s ease;
}

.upload-area:hover {
    background: #f1efff;
    border-color: #6558e8;
}

.upload-icon {
    font-size: 32px;
}

.upload-area strong {
    color: #292544;
    font-size: 15px;
}

.upload-area span:not(.upload-icon) {
    color: #77738c;
    font-size: 13px;
}

.upload-button {
    padding: 9px 20px;
    border-radius: 9px;
    background: #6558e8;
    color: white !important;
    font-weight: 600;
}

.upload-area small {
    color: #9995a8;
    font-size: 11px;
}

#imagePreviewContainer {
    margin-top: 12px;
}
#itemImage {
    display: none !important;
}

/* EDIT AND DELETE BUTTONS */

.item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #eeeef5;
}

.item-actions button {
    flex: 1;
    min-height: 40px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, 
                transform 0.2s ease, 
                border-color 0.2s ease;
}

.edit-button {
    background: #f0edff;
    color: #6558e8;
    border-color: #e4dfff !important;
}

.edit-button:hover {
    background: #e5e0ff;
    border-color: #d5ccff !important;
    transform: translateY(-1px);
}

.delete-button {
    background: #fff1f1;
    color: #d65353;
    border-color: #ffe1e1 !important;
}

.delete-button:hover {
    background: #ffe5e5;
    border-color: #ffd0d0 !important;
    transform: translateY(-1px);
}

.item-actions button:active {
    transform: scale(0.98);
}

