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

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    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: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    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: var(--bg);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-soft);
}

.placeholder-icon {
    width: 4rem;
    height: 4rem;
    font-size: 0;
    background-color: var(--accent);
    -webkit-mask: url('../pets.svg') center / contain no-repeat;
    mask: url('../pets.svg') center / contain no-repeat;
    opacity: 0.35;
    margin-bottom: 1rem;
}

.placeholder-text {
    color: var(--text-muted);
    font-size: 1rem;
    font-style: italic;
}

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

.breed-detail h1 {
    color: var(--text);
    margin-bottom: 1rem;
    font-family: var(--font-serif);
    font-size: 2.25rem;
    font-weight: 400;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 0.5rem;
}

.breed-detail h3 {
    color: var(--text);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
}

.breed-detail p {
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

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

.breed-detail li {
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

/* Summary Table */
.summary-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.summary-table th,
.summary-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
}

.summary-table th {
    background-color: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.summary-table tr:last-child td {
    border-bottom: none;
}

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

.summary-table tr:hover {
    background-color: var(--accent-soft);
}

/* Conclusion */
.conclusion {
    font-weight: 500;
    color: var(--text);
    font-size: 1.15rem;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background-color: var(--accent-soft);
    border-left: 4px solid var(--accent);
    border-radius: 6px;
}

/* 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;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.related-breed-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.related-breed-card strong {
    color: var(--link);
    font-size: 1rem;
}

.related-breed-card span {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.4;
}

/* References */
.references {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-soft);
}

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

.references a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.15s ease;
}

.references a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    color: var(--link);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
    margin-bottom: 3rem;
}

.back-link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* 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 0 2rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
        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: 1.25rem;
        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;
    }
}
