/* ============================================================
   Aiming page
   Scoped to body.page-aiming / .aim-page
   ============================================================ */

body.page-aiming .aim-page {
    --aim-line: rgba(255, 255, 255, 0.09);
    --aim-line-soft: rgba(255, 255, 255, 0.055);
    --aim-surface: rgba(255, 255, 255, 0.03);
    --aim-glow: rgba(139, 92, 246, 0.32);
    max-width: 1140px;
}

/* ---------- Hero ---------- */

.aim-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
    align-items: center;
    gap: 56px;
    padding: 12px 0 68px;
}

.aim-hero-copy {
    animation: aim-rise 0.7s cubic-bezier(.2, .8, .2, 1) backwards;
}

.aim-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--primary);
}

.aim-eyebrow::before {
    content: "";
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, var(--primary), transparent);
}

.aim-title {
    margin: 20px 0 20px;
    font-size: clamp(2.9rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 0.96;
    letter-spacing: -0.045em;
    color: var(--text-main);
}

.aim-title span {
    display: block;
    background: linear-gradient(100deg, #b7b1c9 0%, #a78bfa 45%, #22d3ee 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.aim-lead {
    max-width: 52ch;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-muted);
}

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

body.page-aiming .aim-actions .btn {
    padding: 13px 22px;
    border-radius: 12px;
    font-size: 0.95rem;
}

body.page-aiming .aim-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary), #6d28d9);
    border: 1px solid transparent;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.25);
}

body.page-aiming .aim-actions .btn-primary:hover {
    background: linear-gradient(135deg, #9b6dff, #7c3aed);
    box-shadow: 0 16px 40px rgba(139, 92, 246, 0.35);
}

/* ---------- Reticle artwork ---------- */

.aim-reticle {
    position: relative;
    width: min(100%, 310px);
    aspect-ratio: 1;
    margin-inline: auto;
    display: grid;
    place-items: center;
    animation: aim-rise 0.8s cubic-bezier(.2, .8, .2, 1) 0.12s backwards;
}

.aim-reticle::before {
    content: "";
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.24), transparent 64%);
    filter: blur(10px);
}

.aim-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.aim-ring-1 {
    inset: 0;
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.12);
    animation: aim-spin 60s linear infinite;
}

.aim-ring-2 {
    inset: 15%;
    border-color: rgba(139, 92, 246, 0.3);
}

.aim-ring-3 {
    inset: 31%;
    border-color: rgba(255, 255, 255, 0.14);
}

.aim-line {
    position: absolute;
    pointer-events: none;
}

.aim-line-x {
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.24) 18%,
            transparent 42%,
            transparent 58%,
            rgba(255, 255, 255, 0.24) 82%,
            transparent);
}

.aim-line-y {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: linear-gradient(180deg,
            transparent,
            rgba(255, 255, 255, 0.24) 18%,
            transparent 42%,
            transparent 58%,
            rgba(255, 255, 255, 0.24) 82%,
            transparent);
}

.aim-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow:
        0 0 0 6px rgba(139, 92, 246, 0.12),
        0 0 28px rgba(139, 92, 246, 0.85);
    animation: aim-pulse 3.4s ease-in-out infinite;
}

@keyframes aim-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 6px rgba(139, 92, 246, 0.12),
            0 0 28px rgba(139, 92, 246, 0.85);
    }
    50% {
        box-shadow:
            0 0 0 10px rgba(139, 92, 246, 0.06),
            0 0 38px rgba(139, 92, 246, 1);
    }
}

@keyframes aim-spin {
    to { transform: rotate(360deg); }
}

@keyframes aim-rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Panel grid ---------- */

.aim-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
}

.aim-panel {
    position: relative;
    padding: 28px 30px 30px;
    border-radius: 22px;
    border: 1px solid var(--aim-line);
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(139, 92, 246, 0.055), transparent 55%),
        var(--aim-surface);
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    animation: aim-rise 0.65s cubic-bezier(.2, .8, .2, 1) backwards;
}

.aim-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
    pointer-events: none;
}

.aim-panel:hover {
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.aim-panel--game {
    grid-column: span 7;
    animation-delay: 0.08s;
    display: flex;
    flex-direction: column;
}

.aim-panel--kovaak {
    grid-column: span 5;
    animation-delay: 0.14s;
}

.aim-panel--trackers,
.aim-panel--profiles {
    grid-column: span 6;
    animation-delay: 0.2s;
}

.aim-panel--profiles {
    animation-delay: 0.26s;
}

.aim-panel--wide {
    grid-column: span 12;
    animation-delay: 0.32s;
}

.aim-panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.aim-index {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.aim-panel-title {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.aim-panel-head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--aim-line), transparent);
}

.aim-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ---------- Main game ---------- */

.aim-game-top {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 26px;
}

.aim-game-icon {
    width: 56px;
    height: 56px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 1.35rem;
    color: #ff7b85;
    background: rgba(255, 70, 85, 0.1);
    border: 1px solid rgba(255, 70, 85, 0.28);
    box-shadow: inset 0 0 20px rgba(255, 70, 85, 0.12);
}

.aim-game-kicker {
    margin-bottom: 6px;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #ff7b85;
}

.aim-game-name {
    margin: 0 0 12px;
    font-size: clamp(1.9rem, 3.4vw, 2.4rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.aim-game-note {
    max-width: 46ch;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-muted);
}

.aim-game-foot {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--aim-line-soft);
}

.aim-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.aim-chip {
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid var(--aim-line-soft);
    background: var(--aim-surface);
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.aim-chip:hover {
    color: var(--text-main);
    border-color: rgba(139, 92, 246, 0.45);
    background: rgba(139, 92, 246, 0.08);
}

/* ---------- Kovaak's setup ---------- */

.aim-sens {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 6px;
}

.aim-sens-value {
    font-size: clamp(2.9rem, 5vw, 3.8rem);
    font-weight: 700;
    line-height: 0.85;
    letter-spacing: -0.05em;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(110deg, var(--text-main) 10%, #b9a6ff 60%, #6ee7f9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.aim-sens-value span {
    padding: 0 0.06em;
    font-weight: 300;
    opacity: 0.6;
}

.aim-sens-unit {
    padding-bottom: 6px;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.aim-scale {
    position: relative;
    height: 5px;
    margin: 24px 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.aim-scale-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20%;
    width: 49%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.55);
}

.aim-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    opacity: 0.65;
}

.aim-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    margin: 24px 0 0;
}

.aim-spec {
    padding-top: 13px;
    border-top: 1px solid var(--aim-line-soft);
}

.aim-spec dt {
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.aim-spec dd {
    margin: 5px 0 0;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.aim-spec--wide {
    grid-column: 1 / -1;
}

/* ---------- Link rows ---------- */

.aim-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.aim-link {
    --link-accent: var(--primary);
    --link-soft: rgba(139, 92, 246, 0.1);
    --link-border: rgba(139, 92, 246, 0.28);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
    border-radius: 14px;
    border: 1px solid var(--aim-line-soft);
    background: rgba(255, 255, 255, 0.018);
    text-decoration: none;
    transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.aim-link:hover {
    background: var(--link-soft);
    border-color: var(--link-border);
    transform: translateX(3px);
}

.aim-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.aim-link-icon {
    width: 40px;
    height: 40px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 11px;
    font-size: 0.95rem;
    color: var(--link-accent);
    background: var(--link-soft);
    border: 1px solid var(--link-border);
}

.aim-link-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.aim-link-text strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.aim-link-text small {
    margin-top: 2px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.aim-link-arrow {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--text-muted);
    transition: transform 0.22s ease, color 0.22s ease;
}

.aim-link:hover .aim-link-arrow {
    color: var(--link-accent);
    transform: translate(2px, -2px);
}

.aim-link--valorant {
    --link-accent: #ff7b85;
    --link-soft: rgba(255, 70, 85, 0.1);
    --link-border: rgba(255, 70, 85, 0.28);
}

.aim-link--purple {
    --link-accent: #a78bfa;
    --link-soft: rgba(139, 92, 246, 0.12);
    --link-border: rgba(139, 92, 246, 0.3);
}

.aim-link--discord {
    --link-accent: #93a2ff;
    --link-soft: rgba(88, 101, 242, 0.14);
    --link-border: rgba(88, 101, 242, 0.32);
}

.aim-link--x {
    --link-accent: #cbd5e1;
    --link-soft: rgba(255, 255, 255, 0.06);
    --link-border: rgba(255, 255, 255, 0.14);
}

/* ---------- Raw Input ---------- */

.aim-panel--raw {
    background:
        radial-gradient(110% 140% at 8% 0%, rgba(88, 101, 242, 0.12), transparent 55%),
        radial-gradient(90% 120% at 100% 100%, rgba(6, 182, 212, 0.06), transparent 60%),
        var(--aim-surface);
}

.aim-raw {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 32px;
    align-items: center;
}

.aim-raw-title {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.aim-raw-text {
    max-width: 44ch;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.aim-raw-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* ---------- Coming soon ---------- */

.aim-soon {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 18px;
    padding: 22px 26px;
    border-radius: 20px;
    border: 1px dashed var(--aim-line);
    background: var(--aim-surface);
}

.aim-soon-icon {
    width: 46px;
    height: 46px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--text-muted);
    border: 1px solid var(--aim-line);
    background: rgba(255, 255, 255, 0.02);
}

.aim-soon .aim-label {
    margin-bottom: 4px;
}

.aim-soon h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.aim-soon p {
    margin-top: 4px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.aim-soon-tag {
    margin-left: auto;
    flex: none;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    color: var(--primary);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
    .aim-panel--game,
    .aim-panel--kovaak {
        grid-column: span 12;
    }
}

@media (max-width: 820px) {
    .aim-hero {
        grid-template-columns: 1fr;
        gap: 36px;
        padding-bottom: 44px;
    }

    .aim-reticle {
        width: 220px;
    }

    .aim-panel--trackers,
    .aim-panel--profiles {
        grid-column: span 12;
    }

    .aim-raw {
        grid-template-columns: 1fr;
        gap: 22px;
    }
}

@media (max-width: 560px) {
    .aim-page {
        padding-left: 16px;
        padding-right: 16px;
    }

    .aim-title {
        font-size: clamp(2.4rem, 10vw, 3.2rem);
    }

    .aim-panel {
        padding: 22px 20px;
        border-radius: 18px;
    }

    .aim-game-top {
        flex-direction: column;
        gap: 14px;
    }

    .aim-specs {
        grid-template-columns: 1fr;
    }

    .aim-spec--wide {
        grid-column: auto;
    }

    .aim-raw-links {
        grid-template-columns: 1fr;
    }

    .aim-soon {
        flex-wrap: wrap;
    }

    .aim-soon-tag {
        margin-left: 0;
    }
}

/* ---------- Light theme ---------- */

body.light-mode .aim-page {
    --aim-line: rgba(15, 23, 42, 0.1);
    --aim-line-soft: rgba(15, 23, 42, 0.07);
    --aim-surface: rgba(255, 255, 255, 0.8);
}

body.light-mode .aim-title span {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--primary);
}

body.light-mode .aim-panel {
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(109, 40, 217, 0.05), transparent 55%),
        rgba(255, 255, 255, 0.92);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

body.light-mode .aim-panel:hover {
    border-color: rgba(109, 40, 217, 0.28);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.1);
}

body.light-mode .aim-panel::before {
    background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.08), transparent);
}

body.light-mode .aim-link {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(15, 23, 42, 0.09);
}

body.light-mode .aim-link:hover {
    background: var(--link-soft);
}

body.light-mode .aim-link--x {
    --link-accent: #0f172a;
    --link-soft: rgba(15, 23, 42, 0.05);
    --link-border: rgba(15, 23, 42, 0.14);
}

body.light-mode .aim-chip {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(15, 23, 42, 0.09);
}

body.light-mode .aim-chip:hover {
    background: rgba(109, 40, 217, 0.07);
}

body.light-mode .aim-scale {
    background: rgba(15, 23, 42, 0.09);
}

body.light-mode .aim-sens-value {
    background: linear-gradient(110deg, #111827 10%, #6d28d9 70%, #0e7490 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .aim-soon {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(15, 23, 42, 0.14);
}

body.light-mode .aim-ring {
    border-color: rgba(15, 23, 42, 0.12);
}

body.light-mode .aim-ring-2 {
    border-color: rgba(109, 40, 217, 0.28);
}

body.light-mode .aim-ring-3 {
    border-color: rgba(15, 23, 42, 0.16);
}

body.light-mode .aim-line-x {
    background: linear-gradient(90deg,
            transparent,
            rgba(15, 23, 42, 0.22) 18%,
            transparent 42%,
            transparent 58%,
            rgba(15, 23, 42, 0.22) 82%,
            transparent);
}

body.light-mode .aim-line-y {
    background: linear-gradient(180deg,
            transparent,
            rgba(15, 23, 42, 0.22) 18%,
            transparent 42%,
            transparent 58%,
            rgba(15, 23, 42, 0.22) 82%,
            transparent);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .aim-page *,
    .aim-page *::before,
    .aim-page *::after {
        animation: none !important;
        transition: none !important;
    }
}
