:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --card-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--light-bg);
    color: #212529;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navbar */
.navbar {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--card-shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-weight: bold;
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
}

.navbar-brand span {
    font-size: 0.9rem;
    font-weight: normal;
    opacity: 0.8;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-toggler {
    background: none;
    border: none;
    cursor: pointer;
    display: none;
}

.menu-icon {
    fill: white;
}

.navbar-collapse {
    display: flex;
    justify-content: flex-end;
}

.navbar-nav {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.nav-link:hover {
    color: #cce5ff;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-link {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
}

.tab-link.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Search Container */
.search-container {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.form-input {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block; /* Ensure the feedback is visible */
}

.item-count-feedback {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block; /* Ensure the item count is visible */
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    justify-items: center;
    max-width: 1000px;
    margin: 0 auto;
    min-height: 100px;
}

.item-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 400px;
    transition: transform 0.2s;
}

.item-card:hover {
    transform: translateY(-3px);
}

.card-body {
    padding: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
}

.card-title {
    font-weight: 600;
    font-size: 1.25rem;
    margin: 0;
}

.timestamp {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.status-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.status-lost {
    background-color: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
}

.status-found {
    background-color: #d1e7dd;
    color: #0a3622;
    border: 1px solid #b3dfce;
}

.card-text {
    color: #495057;
    margin-bottom: 1rem;
}

.item-details p {
    margin-bottom: 0.5rem;
}

.card-image {
    margin-top: 1rem;
}

.item-image {
    max-width: 100%;
    border-radius: 0.25rem;
}

.no-items {
    text-align: center;
    padding: 2rem;
    color: var(--secondary-color);
}

/* Map Section */
.map-section {
    margin-top: 2rem;
}

#map {
    height: 400px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
}

/* Address List */
#address-list {
    margin-top: 1rem;
}

#address-list h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

#address-list ul {
    list-style-type: none;
    padding: 0;
}

#address-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    max-width: 600px;
    width: 90%;
    margin: 2rem auto;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
    max-height: none;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: block;
}

.form-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.modal-footer {
    padding: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

#submit-btn.loading .submit-text {
    display: none;
}

#submit-btn.loading .spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid white;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner {
    display: none;
}

/* Alerts */
.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    padding: 1rem;
    border-radius: 0.25rem;
    z-index: 1100;
}

.alert-success {
    background: var(--success-color);
    color: white;
}

.alert-danger {
    background: var(--danger-color);
    color: white;
}

.alert-close {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    margin-left: 1rem;
}

/* Report Button */
.report-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: none;
    font-weight: 500;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1000;
}

.report-btn:hover {
    background: #157347;
    transform: scale(1.05);
}

/* Form Validation */
.was-validated .form-input:invalid,
.form-input.is-invalid,
.was-validated .form-select:invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    display: none;
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.was-validated .form-input:invalid ~ .invalid-feedback,
.was-validated .form-select:invalid ~ .invalid-feedback,
.form-input.is-invalid ~ .invalid-feedback,
.form-select.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Responsive Design */
@media (min-width: 768px) {
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .navbar-toggler {
        display: none;
    }

    .navbar-collapse {
        display: flex;
    }
}

@media (max-width: 767px) {
    .navbar-toggler {
        display: block;
    }

    .navbar-collapse {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        padding: 1rem;
    }

    .navbar-collapse.show {
        display: flex;
    }

    .tabs {
        flex-direction: column;
        align-items: center;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Emergency AI */
.emergency-header {
    background: var(--danger-color);
}

.chat-body {
    max-height: 400px;
    overflow-y: auto;
    background: #f8f9fa;
    padding: 1rem;
}

.message {
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    max-width: 80%;
}

.bot-message {
    background: #e9ecef;
}

.user-message {
    background: var(--danger-color);
    color: white;
    margin-left: auto;
}

.chat-footer {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.contact-link {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Disclaimer */
.disclaimer-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow);
}

.disclaimer-header {
    text-align: center;
    color: var(--danger-color);
    border-bottom: 2px solid var(--danger-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.warning-icon {
    font-size: 2rem;
    margin-right: 0.5rem;
}

.disclaimer-point {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--primary-color);
}

.form-check {
    margin-bottom: 1.5rem;
}

.form-check-input {
    margin-right: 0.5rem;
}

.text-center {
    text-align: center;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #157347;
}

/* Add to the end of styles.css */

/* About Page Sections */
.about-section {
    padding: 2rem 0;
}

.about-content, .app-content, .eai-content {
    margin-bottom: 2rem;
}

.about-content h2, .app-content h2, .eai-content h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.about-content h3, .app-content h3, .eai-content h3 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.about-content p, .app-content p, .eai-content p {
    line-height: 1.6;
    color: #495057;
}

.about-content ul, .app-content ul, .eai-content ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.portfolio-links li, .social-links li {
    margin-bottom: 0.5rem;
}

.portfolio-links a, .social-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.portfolio-links a:hover, .social-links a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    text-align: center;
    margin-top: 2rem;
}

.footer p {
    margin: 0;
    font-size: 0.875rem;
}

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.footer-links li {
    display: inline;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    color: #cce5ff;
}