:root {
    --bg1: #0f172a;
    --bg2: #1e293b;

    --card: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.12);

    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.7);

    --green: #22c55e;
    --blue: #3b82f6;

    --shadow:
        0 20px 50px rgba(0,0,0,.35);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;

    background:
        radial-gradient(
            circle at top left,
            #2563eb,
            transparent 35%
        ),
        radial-gradient(
            circle at top right,
            #7c3aed,
            transparent 35%
        ),
        linear-gradient(
            180deg,
            var(--bg1),
            var(--bg2)
        );
}

.container {
    width: 100%;
    max-width: 850px;
    margin: auto;
    padding: 20px;
}

.hero-card,
.card,
.mini-card {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    background: var(--card);

    border: 1px solid
        var(--card-border);

    box-shadow:
        var(--shadow);

    border-radius: 30px;
}

.hero-card {
    padding: 28px;
    text-align: center;
    margin-bottom: 24px;
}

.card {
    padding: 24px;
    margin-bottom: 24px;
}

.hero-icon {
    font-size: 52px;
    margin-bottom: 10px;
}

h1 {
    margin: 0;
    font-size: 38px;
    font-weight: 800;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.last-action {
    margin-top: 20px;
}

.last-action .label {
    color: var(--muted);
    margin-bottom: 8px;
}

.last-action .text {
    font-size: 20px;
    font-weight: 600;
}

.time,
.event-time {
    color: var(--muted);
    font-size: 14px;
    margin-top: 6px;
}

.stats-button {
    display: inline-block;

    margin-top: 24px;

    padding:
        14px 24px;

    background:
        rgba(255,255,255,.12);

    border:
        1px solid
        rgba(255,255,255,.15);

    border-radius: 999px;

    text-decoration: none;

    color: white;

    font-weight: 600;
}

.users-grid {
    display: grid;
    grid-template-columns:
        repeat(2, 1fr);

    gap: 16px;
}

.user-btn {
    border: none;
    border-radius: 26px;

    background:
        rgba(255,255,255,.08);

    color: white;

    height: 140px;

    cursor: pointer;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    transition: .2s;
}

.user-btn:active {
    transform: scale(.97);
}

.user-btn.selected {
    background:
        linear-gradient(
            135deg,
            #2563eb,
            #7c3aed
        );

    border:
        2px solid
        rgba(255,255,255,.25);
}

.avatar {
    font-size: 48px;
}

.name {
    margin-top: 10px;
    font-size: 20px;
    font-weight: 600;
}

.actions-grid {
    display: grid;
    grid-template-columns:
        repeat(2, 1fr);

    gap: 16px;
}

.action-btn {
    border: none;
    border-radius: 28px;

    color: white;

    padding: 28px;

    cursor: pointer;

    font-size: 22px;
    font-weight: 700;

    transition: .2s;
}

.action-btn:active {
    transform: scale(.97);
}

.action-btn .emoji {
    font-size: 42px;
    margin-bottom: 10px;
}

.green {
    background:
        linear-gradient(
            135deg,
            #22c55e,
            #16a34a
        );
}

.blue {
    background:
        linear-gradient(
            135deg,
            #3b82f6,
            #2563eb
        );
}

.event-row {
    padding: 16px 0;
    border-bottom:
        1px solid
        rgba(255,255,255,.08);
}

.event-row:last-child {
    border-bottom: none;
}

.event-title {
    font-size: 17px;
    font-weight: 500;
}

.toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.toggle-btn {
    text-decoration: none;
    color: white;

    padding:
        12px 18px;

    border-radius: 999px;

    background:
        rgba(255,255,255,.08);

    border:
        1px solid
        rgba(255,255,255,.08);

    transition: .2s;
}

.toggle-btn.active {
    background:
        linear-gradient(
            135deg,
            #2563eb,
            #7c3aed
        );
}

.stats-grid {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);

    gap: 16px;

    margin-bottom: 24px;
}

.mini-card {
    padding: 24px;
    text-align: center;
}

.big-number {
    font-size: 42px;
    font-weight: 800;
}

.mini-label {
    color: var(--muted);
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.badge {
    background:
        rgba(255,255,255,.1);

    border:
        1px solid
        rgba(255,255,255,.08);

    border-radius: 999px;

    padding:
        12px 18px;
}

.heatmap-container {
    overflow-x: auto;
    padding-bottom: 10px;
}

.heatmap {
    display: grid;

    grid-auto-flow: column;

    grid-template-rows:
        repeat(7, 14px);

    grid-auto-columns: 14px;

    gap: 4px;

    width: max-content;
}

.heatmap-wrapper {
    position: relative;
    width: max-content;
}

.month-row {
    position: relative;
    height: 22px;
    margin-left: 32px;
}

.month-label {
    position: absolute;

    font-size: 12px;
    color: var(--muted);

    white-space: nowrap;
}

.heatmap-area {
    display: flex;
}

.weekdays {
    width: 24px;

    display: grid;
    grid-template-rows:
        repeat(7, 14px);

    gap: 4px;

    margin-right: 8px;
}

.weekdays span {
    font-size: 11px;
    color: var(--muted);
}

.weekdays span:nth-child(1) {
    grid-row: 1;
}

.weekdays span:nth-child(2) {
    grid-row: 3;
}

.weekdays span:nth-child(3) {
    grid-row: 5;
}

.cell {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.level-0 {
    background:
        rgba(255,255,255,.08);
}

.level-1 {
    background:
        #0e4429;
}

.level-2 {
    background:
        #006d32;
}

.level-3 {
    background:
        #26a641;
}

.level-4 {
    background:
        #39d353;
}

.heatmap-legend {
    margin-top: 20px;

    display: flex;
    align-items: center;
    gap: 6px;

    color: var(--muted);
    font-size: 13px;
}

.leader-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 18px 0;

    border-bottom:
        1px solid
        rgba(255,255,255,.08);
}

.leader-row:last-child {
    border-bottom: none;
}

.leader-user {
    font-size: 18px;
}

.leader-score {
    font-size: 24px;
    font-weight: 700;
}

.leader {
    margin-bottom: 22px;
}

.leader-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.leader-progress {
    height: 14px;

    background:
        rgba(255,255,255,.08);

    border-radius: 999px;

    overflow: hidden;
}

.leader-fill {
    height: 100%;

    border-radius: 999px;

    background:
        linear-gradient(
            90deg,
            #f59e0b,
            #f97316
        );
}

.toast {
    position: fixed;

    left: 50%;
    bottom: 40px;

    transform:
        translateX(-50%)
        translateY(120px);

    background:
        rgba(0,0,0,.85);

    color: white;

    padding:
        14px 22px;

    border-radius: 999px;

    transition: .25s;

    z-index: 999;
}

.toast.show {
    transform:
        translateX(-50%)
        translateY(0);
}

@media (max-width: 700px) {

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 32px;
    }

    .hero-card {
        padding: 24px;
    }
}