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

:root {
    --bg-1: #070B18;
    --bg-2: #0B2D46;

    --text: rgba(255,255,255,0.92);
    --muted: rgba(255,255,255,0.70);

    --card-text: #0E1420;
    --card-muted: rgba(14, 20, 32, 0.64);

    --primary: #4F7CFF;
    --primary-2: #67E8F9;

    --shadow: 0 20px 60px rgba(0,0,0,0.45);
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.25);

    --radius: 18px;
    --radius-sm: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    overflow-x: hidden;
}

.bg {
    position: fixed;
    inset: 0;
    background:
            radial-gradient(1200px 800px at 20% 10%, rgba(79, 124, 255, 0.45), transparent 55%),
            radial-gradient(900px 700px at 80% 20%, rgba(103, 232, 249, 0.35), transparent 55%),
            radial-gradient(1000px 900px at 60% 90%, rgba(34, 197, 94, 0.18), transparent 55%),
            linear-gradient(135deg, var(--bg-1), var(--bg-2));
    z-index: -3;
}

.noise {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
    opacity: 0.08;
    z-index: -2;
    pointer-events: none;
}

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

.header, .footer {
    backdrop-filter: blur(10px);
    background: rgba(0,0,0,0.12);
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.header {
    padding: 16px 0;
}

.footer {
    border-top: 1px solid rgba(255,255,255,0.10);
    border-bottom: none;
    padding: 16px 0;
}

.header-inner, .footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-inner p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--muted);
}

.footer-muted {
    opacity: 0.8;
}

.brand {
    display: flex;
    gap: 14px;
    align-items: center;
}

.logo {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(79,124,255,0.95), rgba(103,232,249,0.85));
    color: white;
    font-weight: 900;
    letter-spacing: 0.5px;
    box-shadow: 0 14px 40px rgba(79, 124, 255, 0.30);
}

.brand-title {
    font-weight: 900;
    letter-spacing: 0.2px;
    font-size: 1.05rem;
    line-height: 1.1;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 2px;
}

.logout-btn {
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    color: white;
    padding: 10px 14px;
    border-radius: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
    box-shadow: var(--shadow-soft);
}

.logout-btn:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-1px);
}

.logout-ico svg {
    width: 18px;
    height: 18px;
}

.main-content {
    padding: 26px 0 32px;
    min-height: calc(100vh - 140px);
    display: grid;
    place-items: center;
}

.grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
}

.card {
    background: rgba(255,255,255,0.86);
    color: var(--card-text);
    border: 1px solid rgba(255,255,255,0.65);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px);
    animation: pop 520ms ease forwards;
}

@keyframes pop {
    to { opacity: 1; transform: translateY(0); }
}

.card::before {
    content: "";
    position: absolute;
    inset: -2px;
    background:
            radial-gradient(900px 360px at 20% 10%, rgba(79,124,255,0.18), transparent 55%),
            radial-gradient(900px 360px at 80% 10%, rgba(103,232,249,0.16), transparent 55%);
    pointer-events: none;
}

.hero, .actions { z-index: 1; }

.hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.badge {
    background: rgba(79,124,255,0.16);
    color: rgba(14,20,32,0.85);
    border: 1px solid rgba(79,124,255,0.20);
    padding: 8px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.9rem;
    white-space: nowrap;
}

.hero-title h1 {
    margin: 0;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.subtitle {
    margin: 8px 0 0;
    color: var(--card-muted);
    font-size: 0.98rem;
}

.user-cards {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.info-tile {
    background: rgba(255,255,255,0.70);
    border: 1px solid rgba(15,23,42,0.12);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.info-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0,0,0,0.10);
}

.tile-ico {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(79,124,255,0.12);
    color: rgba(14,20,32,0.70);
}

.tile-ico svg { width: 22px; height: 22px; }

.label {
    font-size: 0.85rem;
    color: rgba(14,20,32,0.62);
    font-weight: 700;
}

.value {
    font-size: 1.02rem;
    font-weight: 900;
    color: rgba(14,20,32,0.92);
    margin-top: 2px;
}

.skeleton {
    position: relative;
    color: transparent !important;
    background: rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: shimmer 1.1s infinite;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

.hero-footer {
    margin-top: 16px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.intro {
    margin: 0;
    color: rgba(14,20,32,0.70);
    max-width: 520px;
}

.mini-stats {
    display: flex;
    gap: 10px;
}

.stat {
    background: rgba(255,255,255,0.70);
    border: 1px solid rgba(15,23,42,0.12);
    border-radius: 14px;
    padding: 10px 12px;
    text-align: center;
    min-width: 84px;
}

.stat-num {
    font-weight: 900;
    font-size: 1.15rem;
    color: rgba(14,20,32,0.92);
}

.stat-text {
    font-size: 0.82rem;
    color: rgba(14,20,32,0.55);
    margin-top: 2px;
    font-weight: 700;
}

.actions-title {
    margin: 0;
    font-size: 1.3rem;
    letter-spacing: -0.3px;
}

.actions-subtitle {
    margin: 8px 0 0;
    color: var(--card-muted);
}

.actions-grid {
    margin-top: 16px;
    display: grid;
    gap: 12px;
}

.action-tile {
    width: 100%;
    border: 1px solid rgba(15,23,42,0.12);
    background: rgba(255,255,255,0.72);
    border-radius: 18px;
    padding: 14px;
    cursor: pointer;
    text-align: left;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.action-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0,0,0,0.10);
    border-color: rgba(79,124,255,0.25);
}

.tile-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    box-shadow: 0 14px 30px rgba(0,0,0,0.08);
}

.tile-text { flex: 1; }

.tile-title {
    font-weight: 900;
    color: rgba(14,20,32,0.92);
}

.tile-desc {
    margin-top: 2px;
    color: rgba(14,20,32,0.60);
    font-size: 0.9rem;
}

.tile-cta {
    margin-top: 12px;
    font-weight: 900;
    color: rgba(14,20,32,0.70);
}

.action-tile.weather .tile-icon {
    background: linear-gradient(135deg, rgba(79,124,255,0.22), rgba(103,232,249,0.22));
}
.action-tile.fact .tile-icon {
    background: linear-gradient(135deg, rgba(247,151,30,0.22), rgba(255,210,0,0.22));
}
.action-tile.clothes .tile-icon {
    background: linear-gradient(135deg, rgba(34,197,94,0.20), rgba(67,233,123,0.20));
}

.tip {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(79,124,255,0.12);
    border: 1px solid rgba(79,124,255,0.16);
    color: rgba(14,20,32,0.78);
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 700;
}

.tip-ico {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,0.65);
}

.map-block{
    margin-top:14px;
    background:rgba(255,255,255,.58);
    border:1px solid rgba(15,23,42,.10);
    border-radius:18px;
    padding:12px;
    box-shadow:0 16px 34px rgba(0,0,0,.10);
}

.map-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:12px;
    margin-bottom:10px;
}

.map-title{
    font-weight:900;
    color:rgba(14,20,32,.92);
}

.map-sub{
    font-weight:700;
    font-size:.92rem;
    color:rgba(14,20,32,.62);
    white-space:nowrap;
}

.home-map{
    width:100%;
    height:220px;
    border-radius:14px;
    overflow:hidden;
}

.auth-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.auth-modal-backdrop.show {
    display: flex;
}

.auth-modal-card {
    width: min(460px, 100%);
    background: rgba(255,255,255,.96);
    color: #0E1420;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,.30);
}

.auth-modal-title {
    margin: 0 0 10px;
    font-size: 1.35rem;
    font-weight: 800;
}

.auth-modal-text {
    margin: 0;
    color: rgba(14,20,32,.72);
    line-height: 1.5;
}

.auth-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.auth-modal-btn {
    flex: 1;
    min-height: 46px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-btn.primary {
    background: linear-gradient(135deg, #4F7CFF, #67E8F9);
    color: #fff;
}

.auth-modal-btn.secondary {
    background: rgba(15,23,42,.08);
    color: #0E1420;
}

@media(max-width:540px){
    .home-map{height:200px;}
    .map-sub{display:none;}
}

@media (max-width: 920px) {
    .grid { grid-template-columns: 1fr; }
    .user-cards { grid-template-columns: 1fr; }
}