/* Point Blank — Old War | Игровой дизайн */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #06080d;
    --bg2: #0c0f18;
    --bg3: #12162a;
    --surface: rgba(18, 22, 42, 0.85);
    --surface-solid: #161c35;
    --border: rgba(0, 240, 255, 0.2);
    --border-bright: rgba(0, 240, 255, 0.5);
    --text: #e8ecf7;
    --text2: #8b9dc3;
    --text3: #5a6a8f;
    --accent: #00f0ff;
    --accent2: #00b8c4;
    --accent-glow: rgba(0, 240, 255, 0.4);
    --accent-dim: rgba(0, 240, 255, 0.15);
    --green: #00ff88;
    --green-glow: rgba(0, 255, 136, 0.3);
    --red: #ff4466;
    --red-glow: rgba(255, 68, 102, 0.3);
    --gold: #ffb800;
    --radius: 12px;
    --radius-sm: 8px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --font-head: 'Orbitron', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Фоновый слой — сетка и градиент */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 0%, rgba(0, 240, 255, 0.02) 50%, transparent 100%),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 240, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ========== HEADER ========== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(6, 8, 13, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header:hover {
    border-color: var(--border-bright);
    box-shadow: 0 0 30px var(--accent-dim);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.header-brand {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.35rem;
    line-height: 1.15;
    letter-spacing: 0.05em;
    transition: color 0.3s var(--ease), text-shadow 0.3s var(--ease);
}

.header-brand:hover {
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

.header-brand-sub {
    font-size: 0.45rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.35em;
    color: var(--accent);
    margin-top: 2px;
    opacity: 0.9;
}

.header-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--accent);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--ease);
}

.header-burger:hover {
    background: var(--accent-dim);
    box-shadow: 0 0 20px var(--accent-dim);
}

.header-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.header-burger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.header-burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.header-burger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.header-nav-wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-nav { display: flex; align-items: center; gap: 0.5rem; }

.header-link {
    padding: 0.5rem 1rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    transition: color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.header-link:hover {
    color: var(--accent);
    background: var(--accent-dim);
    box-shadow: 0 0 15px var(--accent-dim);
}

.header-link-accent { color: var(--accent); text-shadow: 0 0 12px var(--accent-glow); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.header-user {
    padding: 0.45rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text2);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.header-btn {
    display: inline-block;
    padding: 0.55rem 1.2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: var(--bg);
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
    border: none;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}

.header-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--accent-glow);
    filter: brightness(1.1);
}

/* ========== PAGE & SECTIONS ========== */
.page { flex: 1; position: relative; z-index: 1; }

.section {
    padding: 3rem 1.5rem;
    animation: fadeInUp 0.6s var(--ease-out) backwards;
}

.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.2s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-hero {
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
    text-align: center;
}

.section-profile,
.section-download { padding: 3rem 1.5rem; }

.section-auth {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.container-narrow { max-width: 480px; }

/* ========== HERO ========== */
.hero-title {
    margin: 0 0 1rem;
    font-family: var(--font-head);
    font-size: clamp(2.5rem, 12vw, 4.5rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.05;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    animation: fadeInUp 0.8s var(--ease-out) 0.2s backwards;
}

.hero-title-main {
    color: var(--text);
    text-shadow: 0 0 40px var(--accent-glow);
}

.hero-title-sub {
    font-size: 0.32em;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--accent);
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; filter: drop-shadow(0 0 8px var(--accent-glow)); }
    50% { opacity: 0.85; filter: drop-shadow(0 0 16px var(--accent-glow)); }
}

.hero-text {
    margin: 0 0 2rem;
    font-size: 1.2rem;
    color: var(--text2);
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s var(--ease-out) 0.35s backwards;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 0.8s var(--ease-out) 0.5s backwards;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
    color: var(--bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--accent-glow);
    filter: brightness(1.1);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent-dim);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--accent-dim);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg3);
    border-color: var(--border-bright);
    box-shadow: 0 0 20px var(--accent-dim);
}

.btn-lg { padding: 1rem 2.25rem; font-size: 1.1rem; }

.btn-full { width: 100%; }

/* ========== CARDS & BLOCKS ========== */
.card {
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 0 40px var(--accent-dim);
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
    animation: fadeInUp 0.5s var(--ease-out) backwards;
}

.card:hover {
    border-color: var(--border-bright);
    box-shadow: 0 0 50px var(--accent-dim);
}

.card-auth { max-width: 420px; margin: 0 auto; }

.card-title {
    margin: 0 0 0.25rem;
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}

.card-sub { margin: 0 0 1.5rem; font-size: 1rem; color: var(--text2); }

.card-foot { margin-top: 1.5rem; text-align: center; font-size: 1rem; }

.link {
    color: #00e5ff;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s var(--ease), text-shadow 0.3s var(--ease);
}
.link:hover {
    color: #5cefff;
    text-shadow: 0 0 12px var(--accent-glow);
}

/* Download block */
.download-block {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 0 40px var(--accent-dim);
    animation: fadeInUp 0.5s var(--ease-out) backwards;
}

.download-title {
    margin: 0 0 0.5rem;
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.download-text { margin: 0 0 1.5rem; color: var(--text2); font-size: 1rem; }

.download-soon { margin: 0; color: var(--text3); font-size: 0.95rem; }

/* ========== PROFILE ========== */
.profile-block {
    max-width: 560px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 0 40px var(--accent-dim);
    animation: fadeInUp 0.5s var(--ease-out) backwards;
}

.profile-head { margin-bottom: 1.5rem; }

.profile-title {
    margin: 0 0 0.25rem;
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.profile-login { margin: 0; font-size: 1rem; color: var(--text2); }

.profile-login strong { color: var(--accent); }

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.profile-stat {
    padding: 1.25rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.profile-stat:hover {
    border-color: var(--border-bright);
    box-shadow: 0 0 20px var(--accent-dim);
}

.profile-stat-value {
    display: block;
    font-family: var(--font-head);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
}

.profile-stat-cash .profile-stat-value { color: var(--gold); }

.profile-stat-label { font-size: 0.9rem; color: var(--text2); margin-top: 0.25rem; }

.profile-meta {
    display: grid;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
    padding: 1.25rem;
    background: var(--bg2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.profile-meta-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 0.5rem;
    font-size: 1rem;
}

.profile-meta-row dt { margin: 0; color: var(--text2); }

.profile-meta-row dd { margin: 0; color: var(--text); }

/* Звание: иконка + название */
.profile-rank {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.profile-rank-icon-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-rank-icon {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.profile-rank-badge {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent);
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid var(--border);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-dim);
}

.profile-rank-badge.show {
    display: flex;
}

.profile-rank-name {
    font-weight: 600;
    color: var(--text);
}

.profile-hint { margin: 0 0 1.5rem; font-size: 1rem; color: var(--text2); }

.tag {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 6px;
}

.tag-online {
    background: rgba(0, 255, 136, 0.15);
    color: var(--green);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.tag-offline {
    background: var(--surface-solid);
    color: var(--text2);
    border: 1px solid var(--border);
}

/* ========== FORMS ========== */
.form-field { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text2);
}

.form-input {
    width: 100%;
    padding: 0.85rem 1.1rem;
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--text);
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

/* ========== ALERTS ========== */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid;
    animation: fadeInUp 0.4s var(--ease-out);
}

.alert-error {
    background: rgba(255, 68, 102, 0.12);
    color: #ff8899;
    border-color: rgba(255, 68, 102, 0.4);
}

.alert-success {
    background: rgba(0, 255, 136, 0.12);
    color: #66ffbb;
    border-color: rgba(0, 255, 136, 0.4);
}

/* ========== FOOTER ========== */
.site-footer {
    margin-top: auto;
    padding: 1.75rem 1.5rem;
    background: var(--bg2);
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }

.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 0.75rem;
}

.footer-brand {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s var(--ease);
}

.footer-brand:hover { color: var(--accent); }

.footer-link { color: var(--text); text-decoration: none; font-weight: 600; transition: color 0.3s var(--ease); }

.footer-link:hover { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }

.footer-copy { font-size: 0.9rem; color: var(--text3); }

/* ========== RANKS PAGE ========== */
.section-ranks { padding: 2.5rem 1.5rem 3.5rem; }

.ranks-head {
    text-align: center;
    margin-bottom: 2.5rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.ranks-title {
    margin: 0 0 0.75rem;
    font-family: var(--font-head);
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: 0.02em;
}

.ranks-desc {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text2);
}

.ranks-desc strong { color: var(--text); }

.ranks-block {
    margin-bottom: 2rem;
    overflow: hidden;
}

.ranks-block:last-of-type { margin-bottom: 0; }

.ranks-block-title {
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
}

.ranks-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ranks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.ranks-table th,
.ranks-table td {
    padding: 0.65rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.ranks-table thead th {
    font-family: var(--font-head);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text3);
    background: rgba(0, 0, 0, 0.35);
}

.ranks-table tbody tr {
    transition: background 0.2s var(--ease);
}

.ranks-table tbody tr:hover {
    background: rgba(0, 240, 255, 0.04);
}

.ranks-col-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ranks-badge {
    display: inline-block;
    min-width: 2rem;
    padding: 0.2rem 0.5rem;
    font-family: var(--font-head);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: 4px;
    text-align: center;
}

.ranks-col-icon {
    width: 44px;
    padding-right: 0.5rem;
    vertical-align: middle;
}

.ranks-row-icon-wrap {
    display: inline-block;
    line-height: 0;
}

.ranks-row-icon {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.ranks-row-icon-badge {
    display: none;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--accent);
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid var(--border);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-dim);
}

.ranks-row-icon-badge.show {
    display: inline-flex;
}

.ranks-name-ru {
    display: block;
    font-weight: 600;
    color: var(--text);
}

.ranks-name-en {
    display: block;
    font-size: 0.8rem;
    color: var(--text3);
    margin-top: 0.15rem;
}

/* ========== MOBILE ========== */
@media (max-width: 768px) {
    .header-burger { display: flex; }

    .header-nav-wrap {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(6, 8, 13, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
        padding: 5rem 1.5rem;
        opacity: 0;
        visibility: hidden;
        transform: scale(0.95);
        transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease), transform 0.3s var(--ease);
    }

    .header-nav-wrap.is-open {
        opacity: 1;
        visibility: visible;
        transform: scale(1);
    }

    .header-nav { flex-direction: column; }
    .header-actions { flex-direction: column; }
    .header-link, .header-btn { padding: 1rem 1.5rem; font-size: 1.1rem; }

    .section-hero { min-height: 70vh; padding: 3rem 1rem; }
    .hero-title { font-size: clamp(2rem, 10vw, 3.5rem); }
}

@media (max-width: 480px) {
    .section { padding: 2rem 1rem; }
    .section-ranks { padding: 1.5rem 1rem 2.5rem; }
    .ranks-title { font-size: 1.5rem; }
    .ranks-desc { font-size: 0.95rem; }
    .ranks-block { padding: 1.25rem 1rem; }
    .ranks-table { font-size: 0.85rem; min-width: 380px; }
    .ranks-table th,
    .ranks-table td { padding: 0.5rem 0.65rem; }
    .profile-block { padding: 1.5rem 1.25rem; }
    .profile-meta-row { grid-template-columns: 1fr; }
    .profile-stats { grid-template-columns: 1fr; }
    .btn-lg { width: 100%; max-width: 280px; }
}
