* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
}

a {
    color: #93c5fd;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    background: rgba(17, 24, 39, 0.95);
    border-bottom: 1px solid #1f2937;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    gap: 20px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #f8fafc;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.page {
    padding: 30px 0 60px;
}

.hero {
    background: linear-gradient(135deg, #1d4ed8, #7c3aed);
    border-radius: 24px;
    padding: 42px;
    margin-bottom: 30px;
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.22);
}

.hero h1 {
    margin-top: 14px;
    margin-bottom: 16px;
    font-size: 42px;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.card h1,
.card h2,
.card h3,
.card h4 {
    margin-top: 0;
}

.muted {
    color: #94a3b8;
}

.alert {
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-weight: 700;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

form {
    display: grid;
    gap: 14px;
}

input,
textarea,
select,
button {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #334155;
    padding: 12px 14px;
    font-size: 16px;
    background: #0b1220;
    color: #f8fafc;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button,
.button-link {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border: none;
    cursor: pointer;
    font-weight: 700;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

button:hover,
.button-link:hover {
    filter: brightness(1.05);
    text-decoration: none;
}

.button-link-muted {
    background: #1e293b;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.inline-form {
    display: inline-grid;
    width: auto;
}

.list {
    display: grid;
    gap: 14px;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    background: #1e293b;
    color: #cbd5e1;
}

.badge-light {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.site-footer {
    border-top: 1px solid #1f2937;
    background: #111827;
    padding: 24px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.stars {
    color: #facc15;
    letter-spacing: 2px;
}

.section-space {
    margin-top: 28px;
}

.section-space-small {
    margin-top: 18px;
}

.section-head {
    margin-bottom: 14px;
}

.section-head h2 {
    margin-bottom: 0;
}

.meta-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.table-like-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.info-grid .card {
    min-height: 100%;
}

.layout-wide {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.chat-thread {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.chat-message {
    background: #0b1220;
    border: 1px solid #243244;
    border-radius: 16px;
    padding: 14px;
    max-width: 92%;
}

.chat-message-own {
    margin-left: auto;
    background: rgba(37, 99, 235, 0.16);
    border-color: rgba(96, 165, 250, 0.35);
}

.chat-author {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.chat-text {
    line-height: 1.55;
    white-space: pre-wrap;
}

.chat-time {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 10px;
}

@media (max-width: 840px) {
    .layout-wide {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .hero {
        padding: 28px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .nav-wrap {
        align-items: flex-start;
        flex-direction: column;
    }

    .table-like-meta {
        flex-direction: column;
    }
}
