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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem 0;
}

/* Breed Detail Page */
.breed-detail {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.breed-detail img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

/* No Image Placeholder */
.no-image-placeholder {
    width: 100%;
    height: 300px;
    background: #f8f9fa;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e0e0e0;
}

.placeholder-icon {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.placeholder-text {
    color: #72777d;
    font-size: 1rem;
    font-style: italic;
}

.breed-detail-content {
    padding: 2rem;
}

.breed-detail h1 {
    color: #000000;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.breed-detail h3 {
    color: #000000;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.breed-detail p {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.breed-detail ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.breed-detail li {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

/* Summary Table */
.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.summary-table th,
.summary-table td {
    padding: 1rem;
    text-align: left;
    border: 1px solid #ddd;
}

.summary-table th {
    background-color: #000000;
    color: white;
    font-weight: 600;
}

.summary-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.summary-table tr:hover {
    background-color: #f0f0f0;
}

/* Conclusion */
.conclusion {
    font-weight: 500;
    color: #000000;
    font-size: 1.15rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-left: 4px solid #000000;
    border-radius: 4px;
}

/* Related Breeds */
.related-breeds {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.875rem;
    margin: 1rem 0 1.5rem;
}

.related-breed-card {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.875rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.related-breed-card:hover {
    border-color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.related-breed-card strong {
    color: #0645ad;
    font-size: 1rem;
}

.related-breed-card span {
    color: #666;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* References */
.references {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #e0e0e0;
}

.references p,
.references li {
    margin-bottom: 0.5rem;
}

.references a {
    color: #0645ad;
    text-decoration: none;
    transition: color 0.3s ease;
}

.references a:hover {
    color: #0645ad;
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    color: #0645ad;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    margin-bottom: 3rem;
}

.back-link:hover {
    color: #0645ad;
}

/* Responsive */
@media (max-width: 768px) {
    html {
        overflow-x: hidden;
        width: 100%;
    }

    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    .container {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
    }

    main {
        padding: 1rem 0;
        width: 100%;
    }

    .breed-detail {
        margin: 0;
        border-radius: 0;
        width: 100%;
        max-width: 100%;
    }

    .breed-detail img {
        max-height: 300px;
        width: 100%;
        height: auto;
    }

    .breed-detail-content {
        padding: 1rem;
    }

    .breed-detail h1 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .breed-detail h3 {
        font-size: 1.15rem;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }

    .breed-detail p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .breed-detail ul {
        margin-left: 1.25rem;
    }

    .breed-detail li {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .summary-table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100%;
    }

    .summary-table th,
    .summary-table td {
        padding: 0.5rem;
        white-space: nowrap;
    }

    .summary-table th:first-child,
    .summary-table td:first-child {
        min-width: 100px;
    }

    .summary-table th:last-child,
    .summary-table td:last-child {
        min-width: 200px;
    }

    .references {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }

    .references p {
        font-size: 0.9rem;
        word-wrap: break-word;
    }

    .back-link {
        margin-bottom: 2rem;
        font-size: 0.95rem;
    }

    .no-image-placeholder {
        height: 250px;
    }

    .placeholder-icon {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .breed-detail-content {
        padding: 0.75rem;
    }

    .breed-detail h1 {
        font-size: 1.25rem;
    }

    .breed-detail h3 {
        font-size: 1rem;
    }

    .breed-detail p,
    .breed-detail li {
        font-size: 0.9rem;
    }

    .summary-table {
        font-size: 0.75rem;
    }

    .summary-table th,
    .summary-table td {
        padding: 0.4rem;
    }

    .breed-detail img {
        max-height: 250px;
    }

    .no-image-placeholder {
        height: 200px;
    }

    .placeholder-icon {
        font-size: 2.5rem;
    }
}

/* ===== Dark Mode ===== */
[data-theme="dark"] body {
    background-color: #121212;
    color: #d8d8d8;
}

[data-theme="dark"] .breed-detail {
    background: #1e1e1e;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .breed-detail h1,
[data-theme="dark"] .breed-detail h3 {
    color: #f0f0f0;
}

[data-theme="dark"] .breed-detail p,
[data-theme="dark"] .breed-detail li {
    color: #c8c8c8;
}

[data-theme="dark"] .no-image-placeholder {
    background: #242424;
    border-bottom-color: #333;
}

[data-theme="dark"] .placeholder-text {
    color: #999;
}

[data-theme="dark"] .summary-table {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .summary-table th {
    background-color: #2f4858;
    color: #f0f0f0;
}

[data-theme="dark"] .summary-table th,
[data-theme="dark"] .summary-table td {
    border-color: #3a3a3a;
}

[data-theme="dark"] .summary-table tr:nth-child(even) {
    background-color: #242424;
}

[data-theme="dark"] .summary-table tr:hover {
    background-color: #2c2c2c;
}

[data-theme="dark"] .conclusion {
    background-color: #242424;
    border-left-color: #6ea8ff;
    color: #f0f0f0;
}

[data-theme="dark"] .related-breed-card {
    border-color: #3a3a3a;
}

[data-theme="dark"] .related-breed-card:hover {
    border-color: #6ea8ff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .related-breed-card strong {
    color: #6ea8ff;
}

[data-theme="dark"] .related-breed-card span {
    color: #999;
}

[data-theme="dark"] .references {
    border-top-color: #3a3a3a;
}

[data-theme="dark"] .references a,
[data-theme="dark"] .back-link {
    color: #6ea8ff;
}

[data-theme="dark"] .references a:hover,
[data-theme="dark"] .back-link:hover {
    color: #8fbcff;
}
