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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f8ff;
    color: #333;
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, #4a90e2, #7bb3f0);
    color: white;
    text-align: center;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.family-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.family-header {
    background: linear-gradient(45deg, #6db33f, #8bc34a);
    color: white;
    padding: 1rem;
    text-align: center;
}

.family-content {
    padding: 1.5rem;
}

.parents-section {
    margin-bottom: 2rem;
}

.budgie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.budgie-card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.budgie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.budgie-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1rem;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
}

.budgie-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: transform 0.2s ease;
}

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

.budgie-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c5282;
    margin-bottom: 0.5rem;
}

.budgie-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.detail-row {
    display: contents;
}

.detail-label {
    font-weight: 600;
    color: #4a5568;
}

.detail-value {
    color: #718096;
}

.characteristics {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.characteristic-badge {
    background: #e2e8f0;
    color: #2d3748;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.characteristic-badge.active {
    background: #48bb78;
    color: white;
}

.offspring-section {
    border-top: 2px dashed #cbd5e0;
    padding-top: 1.5rem;
}

.section-title {
    font-size: 1.4rem;
    color: #2d3748;
    margin-bottom: 1rem;
    text-align: center;
}

.navigation {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    padding: 0 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-btn {
    background: #e2e8f0;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #4a5568;
}

.nav-btn:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.nav-btn.active {
    background: #4a90e2;
    color: white;
}

.analytics-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    padding: 2rem;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: #f7fafc;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #4a90e2;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chart-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 1rem;
    text-align: center;
}

.chart-wrapper {
    flex: 1;
    position: relative;
}

.analytics-card {
    background: #f7fafc;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #4a90e2;
}

.analytics-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: #4a5568;
    font-weight: 500;
}

.stat-value {
    color: #2d3748;
    font-weight: bold;
}

.color-distribution {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.color-chip {
    text-align: center;
    padding: 0.75rem;
    border-radius: 8px;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
}

.color-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.25rem;
}

.color-count {
    font-size: 1.2rem;
    font-weight: bold;
    color: #1e293b;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-title {
    color: white;
    font-size: 1.5rem;
    margin-top: 1rem;
    font-weight: bold;
}

.close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close:hover {
    color: #ccc;
}

.about-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    padding: 2rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.characteristic-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 5px solid #4a90e2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.characteristic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.characteristic-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.characteristic-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4a90e2;
}

.characteristic-description {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.characteristic-appearance {
    background: #e2e8f0;
    padding: 1rem;
    border-radius: 6px;
    font-style: italic;
    color: #2d3748;
}

.disclaimer {
    background: #2d3748;
    color: #e2e8f0;
    padding: 2rem 1rem;
    margin-top: 3rem;
    text-align: center;
}

.disclaimer-content {
    max-width: 1000px;
    margin: 0 auto;
    font-size: 0.9rem;
    line-height: 1.6;
}

.disclaimer-content p {
    margin-bottom: 0.75rem;
}

.disclaimer-content p:last-child {
    margin-bottom: 0;
}

.disclaimer a {
    color: #90cdf4;
    text-decoration: none;
    transition: color 0.3s ease;
}

.disclaimer a:hover {
    color: #63b3ed;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .budgie-grid {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2rem;
    }
}
