:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f3f4f6;
    --white: #ffffff;
    --success-color: #059669;
    --warning-color: #d97706;
    --error-color: #dc2626;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
}

/* Navigation */
.navbar {
    background-color: var(--primary-color);
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-weight: bold;
    font-size: 1.25rem;
}

.nav-logo {
    width: 2rem;
    height: 2rem;
    color: var(--white);
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: var(--primary-dark);
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
}

/* Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.header {
    margin-bottom: 2rem;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.header p {
    color: var(--text-light);
    font-size: 1.125rem;
}

/* Search and Filters */
.search-filters {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    width: 1rem;
    height: 1rem;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filters {
    display: flex;
    gap: 1rem;
}

.filters select {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background-color: var(--white);
    font-size: 1rem;
    cursor: pointer;
}

/* Animal Grid */
.animals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.animal-card {
    background-color: var(--white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.animal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.animal-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.animal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
    background-color: #f3f4f6;
    display: block;
}

.animal-card:hover .animal-image img {
    transform: scale(1.05);
}

.status-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-available,
.status-reported {
    background-color: #dcfce7;
    color: #166534;
}

.status-pending {
    background-color: #fef9c3;
    color: #854d0e;
}

.status-adopted {
    background-color: #fee2e2;
    color: #991b1b;
}

.animal-info {
    padding: 1.5rem;
}

.animal-info h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.animal-info .breed {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.animal-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

.meta-item i {
    margin-right: 0.5rem;
    width: 1rem;
    height: 1rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-feed {
    background-color: var(--success-color);
    color: var(--white);
}

.btn-feed:hover {
    background-color: #047857;
}

.btn-feed:disabled {
    background-color: #e5e7eb;
    color: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

.btn-adopt {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-adopt:hover {
    background-color: var(--primary-dark);
}

/* Report Form */
.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.report-form {
    flex: 1;
    min-width: 300px;
    background-color: var(--white);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group button {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 0.375rem;
    background-color: var(--primary-color);
    color: var(--white);
    transition: background-color 0.2s;
}

.form-group button:hover {
    background-color: var(--primary-dark);
}

/* Map */
#map {
    flex: 1;
    height: 500px;
    min-width: 400px;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Animals Detail Page */
.cards-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.card {
    background-color: var(--white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.animal-detail-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 2rem;
}

.animal-info {
    flex: 1;
}

.animal-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.map-container {
    width: 400px;
    height: 300px;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.map-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* Info Card for Map Popups */
.animal-info-card {
    max-width: 250px;
    padding: 1rem;
}

.animal-info-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.animal-info-card p {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.animal-info-card img {
    border-radius: 0.25rem;
}

/* Status Classes */
.status-reported {
    color: var(--primary-color);
    font-weight: 600;
}

.status-available {
    color: var(--success-color);
    font-weight: 600;
}

.status-pending {
    color: var(--warning-color);
    font-weight: 600;
}

.status-adopted {
    color: var(--error-color);
    font-weight: 600;
}

/* Utility Classes */
.no-results {
    text-align: center;
    color: var(--text-light);
    font-size: 1.125rem;
    padding: 2rem;
    grid-column: 1 / -1;
}

.error {
    text-align: center;
    color: var(--error-color);
    font-size: 1.125rem;
    padding: 2rem;
    background-color: #fef2f2;
    border-radius: 0.5rem;
    border: 1px solid #fecaca;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-btn {
        display: block;
    }

    .filters {
        flex-direction: column;
    }

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

    .main-content {
        flex-direction: column;
    }

    #map {
        min-width: 100%;
        height: 400px;
    }

    .animal-detail-card {
        flex-direction: column;
    }

    .map-container {
        width: 100%;
        height: 250px;
    }

    .header h1 {
        font-size: 2rem;
    }
}