@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #010103;
    color: #f8fafc;
    min-height: 100vh;
}

.main-site {
    max-width: 720px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(1, 1, 3, 0.72);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(31, 41, 51, 0.7);
}

.site-branding {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
}

.site-domain {
    font-size: 0.9rem;
    color: #94a3b8;
}

.site-auth-wrap {
    display: flex;
    align-items: center;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.site-nav.center {
    position: relative;
    justify-content: center;
    justify-self: center;
    padding: 0.25rem 0.5rem;
}

.site-nav.right {
    justify-content: flex-end;
    justify-self: end;
}

.site-nav-link {
    color: #93c5fd;
    text-decoration: none;
    font-weight: 600;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
}

.site-nav-link:hover {
    border-bottom-color: rgba(147, 197, 253, 0.95);
}

.site-nav-link.active {
    border-bottom-color: rgba(147, 197, 253, 0.95);
    color: #e2e8f0;
}

.nav-indicator {
    position: absolute;
    bottom: 0;
    height: 2px;
    background: rgba(147, 197, 253, 0.95);
    border-radius: 999px;
    width: 0;
    left: 0;
    transform: translateX(0);
    transition: transform 220ms ease, width 220ms ease, opacity 200ms ease;
    opacity: 0;
}

.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-toggle {
    background: transparent;
    border: none;
    color: #93c5fd;
    font-weight: 600;
    padding: 0.25rem 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-dropdown-toggle .chev {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-right: 2px solid rgba(147, 197, 253, 0.95);
    border-bottom: 2px solid rgba(147, 197, 253, 0.95);
    transform: rotate(45deg) translateY(-1px);
    transition: transform 180ms ease;
    margin-left: 2px;
}

.nav-dropdown:hover .nav-dropdown-toggle .chev,
.nav-dropdown:focus-within .nav-dropdown-toggle .chev {
    transform: rotate(225deg) translateY(1px);
}

.nav-dropdown-toggle:focus-visible {
    outline: 2px solid rgba(56, 189, 248, 0.8);
    outline-offset: 4px;
    border-radius: 8px;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    padding: 0.5rem;
    background: rgba(13, 17, 29, 0.95);
    border: 1px solid #1f2933;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(1, 3, 8, 0.65);
    display: none;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-item {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    color: #e2e8f0;
    font-weight: 600;
}

.nav-dropdown-item:hover {
    background: rgba(56, 189, 248, 0.12);
    color: #f8fafc;
}

.site-user {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: inherit;
    padding: 0.15rem 0.25rem;
    border-radius: 12px;
}

.site-user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    line-height: 1.1;
}

.site-user-name {
    font-weight: 700;
    color: #f8fafc;
}

.site-user-balance {
    font-size: 0.85rem;
    color: #94a3b8;
}

.site-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #0d111d;
    border: 1px solid #1f2933;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
}

.site-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


button {
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}

input,
textarea {
    width: 100%;
    border: 1px solid #1f2933;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    background: #05060a;
    color: #e2e8f0;
    transition: border-color 0.2s ease;
}

select {
    width: 100%;
    border: 1px solid #1f2933;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    background: #05060a;
    color: #e2e8f0;
    transition: border-color 0.2s ease;
    appearance: none;
}

select:focus {
    border-color: #38bdf8;
    outline: none;
}

label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #cbd5f5;
}

input:focus,
textarea:focus {
    border-color: #38bdf8;
    outline: none;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem;
}

.card {
    background: #0d111d;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #1f2933;
    box-shadow: 0 30px 80px rgba(1, 3, 8, 0.65);
}

.muted {
    color: #94a3b8;
    margin: 0;
}

.muted.small {
    font-size: 0.85rem;
    margin: 0;
}

.alert {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.alert.success {
    background: #0e1d2f;
    color: #7dd3fc;
}

.alert.error {
    background: #2c151b;
    color: #fecdd3;
}

.alert.info {
    background: #111b2e;
    color: #cbd5f5;
}

.primary {
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    color: #fff;
}

.secondary {
    background: #1f2933;
    color: #cbd5f5;
    border: 1px solid #1f2933;
}

.inline-form {
    display: inline-block;
    margin: 0;
}

.primary-link {
    color: #93c5fd;
    text-decoration: none;
    font-weight: 600;
}

.page-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.login-card {
    margin: 3rem auto;
    max-width: 420px;
    text-align: left;
    background: #070912;
    border: 1px solid #1f2933;
}

.login-card h1 {
    margin-top: 0;
}

.login-card form {
    display: grid;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

@media (max-width: 700px) {
    .container {
        padding: 2rem 1rem 2.5rem;
    }

    .primary,
    .secondary {
        width: 100%;
    }
}
