:root {
    --bg: #0f172a;
    --surface: #ffffff;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --border: #e2e8f0;
    --success: #166534;
    --error: #991b1b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: #111827;
    background: #f8fafc;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.narrow {
    width: min(700px, 92%);
}

.site-header {
    background: var(--bg);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 1rem;
}

.logo {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: .5rem;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.nav-list a {
    color: #fff;
    text-decoration: none;
    padding: .4rem .7rem;
    border-radius: .4rem;
}

.nav-list a.active,
.nav-list a:hover { background: #1e293b; }

.hero {
    background: linear-gradient(135deg, #e0e7ff 0%, #eff6ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: .8rem;
    padding: 2rem;
    margin: 1.5rem 0;
}

.hero h1 { margin-top: 0; }

.hero-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    border: none;
    background: var(--primary);
    color: #fff;
    padding: .65rem 1rem;
    border-radius: .45rem;
    text-decoration: none;
    cursor: pointer;
}

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

.btn-secondary {
    background: #334155;
}

.content-page {
    background: var(--surface);
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: .7rem;
    margin: 1.5rem 0;
}

.search-form,
.contact-form {
    display: grid;
    gap: .9rem;
    background: var(--surface);
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: .7rem;
    margin-bottom: 1rem;
}

label { display: grid; gap: .4rem; font-weight: 600; }

input, textarea, select {
    width: 100%;
    padding: .6rem;
    border-radius: .4rem;
    border: 1px solid #cbd5e1;
    font: inherit;
}

.inline-check {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.inline-check input {
    width: auto;
}

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

.media-card {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: .7rem;
    overflow: hidden;
}

.media-card img,
.media-card video {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: #e5e7eb;
}

.media-content {
    padding: .9rem;
}

.media-content h2,
.media-content h3 {
    margin-top: 0;
    margin-bottom: .4rem;
    line-height: 1.35;
}

.price {
    color: #047857;
    font-weight: 700;
}

.map {
    margin-top: .8rem;
    height: 220px;
    border-radius: .55rem;
}

.site-footer {
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    background: #f1f5f9;
}

.site-footer p {
    padding: 1rem 0;
    margin: 0;
    color: var(--muted);
}

.alert {
    padding: .8rem;
    border-radius: .5rem;
    margin-bottom: 1rem;
}

.alert.success {
    background: #dcfce7;
    color: var(--success);
}

.alert.error {
    background: #fee2e2;
    color: var(--error);
}

.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: .6rem;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

th, td {
    border-bottom: 1px solid var(--border);
    padding: .65rem;
    text-align: left;
    vertical-align: top;
}

th { background: #f8fafc; }

@media (max-width: 700px) {
    .header-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .media-card img,
    .media-card video {
        height: 190px;
    }
}

.media-content a {
    color: inherit;
    text-decoration: none;
}

.media-content a:hover {
    text-decoration: underline;
}

.media-preview-link {
    display: block;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1rem 0 2rem;
}

.btn-active-page {
    background: #0f172a;
}

.media-detail .detail-media {
    width: 100%;
    max-height: 560px;
    object-fit: contain;
    background: #e5e7eb;
    border-radius: .6rem;
    border: 1px solid var(--border);
}

.media-detail .detail-meta {
    margin-top: 1rem;
}