:root {
    --navy: #071526;
    --navy2: #0d2036;
    --blue: #0b4a8b;
    --gold: #f5c842;
    --red: #d9342b;
    --white: #f6f8fb;
    --muted: #a7b8ca;
    --line: #29425d;
    --green: #43d17a
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: linear-gradient(145deg, #06101e, #0b1d32 55%, #06101e);
    color: var(--white);
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh
}

.top,
main,
footer {
    max-width: 1180px;
    margin: auto
}

.top {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 26px 22px 18px
}

.ua-mark {
    width: 88px;
    height: 88px;
    border: 3px solid var(--gold);
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #114b87, #09213c);
    box-shadow: 0 0 0 5px #0b1726, 0 8px 30px #0007;
    transform: skew(-3deg)
}

.ua-mark span {
    font-weight: 1000;
    font-size: 2rem;
    letter-spacing: -.08em
}

.ua-mark small {
    font-size: .48rem;
    font-weight: 900;
    letter-spacing: .12em;
    color: var(--gold)
}

.title {
    flex: 1
}

.eyebrow,
.tag {
    font-size: .68rem;
    letter-spacing: .16em;
    font-weight: 900;
    color: var(--gold)
}

h1 {
    font-size: 3rem;
    line-height: 1;
    margin: 5px 0
}

.title p {
    margin: 5px 0;
    color: var(--muted)
}

.rank {
    width: 92px;
    height: 92px;
    border: 4px solid var(--gold);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #0b1c30;
    box-shadow: 0 0 35px #f5c84230
}

.rank b {
    font-size: 2.8rem;
    color: var(--gold);
    line-height: 1
}

.rank small {
    font-size: .55rem;
    margin-top: -25px;
    color: var(--muted);
    font-weight: 900
}

.hero-banner {
    margin: 0 22px 18px;
    padding: 26px;
    border: 1px solid var(--line);
    border-top: 5px solid var(--gold);
    border-radius: 18px;
    background: linear-gradient(120deg, #102b4a, #0c1b2d);
    display: flex;
    justify-content: space-between;
    gap: 20px
}

.pill {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 4px;
    background: var(--blue);
    font-size: .75rem;
    font-weight: 900
}

.hero-banner h2 {
    font-size: 1.65rem;
    max-width: 720px;
    margin: 14px 0 8px
}

.quote {
    color: #fff;
    font-weight: 900;
    font-size: 1rem
}

.stats {
    display: flex;
    gap: 18px;
    align-items: center
}

.stats div {
    text-align: center;
    min-width: 85px
}

.stats strong {
    display: block;
    color: var(--gold);
    font-size: 2rem
}

.stats span {
    font-size: .62rem;
    color: var(--muted);
    font-weight: 900
}

.rank-road {
    margin: 0 22px 18px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #09192b
}

.road-head {
    display: flex;
    justify-content: space-between;
    gap: 15px
}

.road-head b {
    display: block;
    font-size: 1.15rem
}

.road-head span {
    font-size: .8rem;
    color: var(--muted)
}

.days {
    font-weight: 900;
    color: var(--gold)
}

.track {
    height: 13px;
    background: #14263b;
    border-radius: 99px;
    margin: 15px 0;
    overflow: hidden
}

.fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--gold));
    border-radius: 99px
}

.milestones {
    display: flex;
    justify-content: space-between
}

.milestones span {
    display: grid;
    text-align: center;
    color: #647b94
}

.milestones span.done {
    color: var(--gold)
}

.milestones b {
    font-size: .95rem
}

.milestones small {
    font-size: .6rem
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding: 0 22px
}

.card {
    background: #0b1b2d;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 21px;
    box-shadow: 0 10px 30px #0004
}

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

.card h3 {
    font-size: 1.25rem;
    margin: 5px 0 14px
}

.lock {
    padding: 5px 9px;
    border-radius: 3px;
    background: #40202a;
    color: #ff8e8e;
    font-size: .62rem;
    font-weight: 900
}

.video-card {
    grid-column: span 2
}

.video-wrap {
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 14px;
    aspect-ratio: 16/9
}

.video-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0
}

.video-status {
    padding: 10px 12px;
    background: #081526;
    color: var(--muted);
    font-size: .78rem;
    margin-top: 10px;
    border-radius: 7px
}

li {
    margin: 10px 0;
    color: #dce8f5
}

.tip {
    font-size: .78rem;
    color: var(--muted);
    line-height: 1.5
}

.habits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin: 17px 0
}

.habits label {
    font-size: .86rem;
    color: #dce8f5
}

.switch {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900
}

.switch input,
.habits input {
    accent-color: var(--gold)
}

textarea {
    width: 100%;
    min-height: 90px;
    margin: 7px 0 13px;
    padding: 11px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #071321;
    color: var(--white);
    resize: vertical;
    font: inherit
}

.checkin label:not(.switch) {
    display: block;
    font-size: .8rem;
    color: var(--muted)
}

button {
    width: 100%;
    padding: 13px;
    border: 0;
    border-radius: 7px;
    background: var(--gold);
    color: #111;
    font-weight: 1000;
    cursor: pointer
}

button:disabled {
    background: #314258;
    color: #8495a8;
    cursor: not-allowed
}

.ghost {
    background: transparent;
    color: var(--muted);
    margin-top: 8px
}

.ranks {
    display: flex;
    gap: 8px
}

.r {
    flex: 1;
    text-align: center;
    padding: 13px 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #627991
}

.r b {
    display: block;
    font-size: 1.5rem
}

.r span {
    font-size: .65rem
}

.r.passed {
    color: var(--green);
    border-color: #276844
}

.r.active {
    color: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 20px #f5c84220
}

.r.active b {
    font-size: 1.7rem
}

footer {
    text-align: center;
    padding: 30px 22px;
    color: #657b93;
    font-size: .75rem
}

footer a {
    color: var(--gold)
}

/* Navigation */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    margin: 0 22px 18px;
    background: rgba(11, 27, 45, 0.8);
    border: 1px solid var(--line);
    border-radius: 12px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 10px 25px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 900;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: transparent;
}

.nav-link:hover {
    background: rgba(245, 200, 66, 0.1);
    color: var(--gold);
    transform: translateY(-2px);
}

.nav-link.active {
    background: var(--gold);
    color: #111;
    box-shadow: 0 0 20px rgba(245, 200, 66, 0.2);
}

.nav-link.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(245, 200, 66, 0.3);
}

/* Clock Banner */
.clock-banner {
    margin: 0 22px 18px;
    padding: 18px 24px;
    background: linear-gradient(135deg, #0d2036, #0b1d32);
    border: 1px solid var(--line);
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.clock-display {
    display: flex;
    align-items: baseline;
    gap: 20px;
    flex-wrap: wrap;
}

.time {
    font-size: 2.2rem;
    font-weight: 1000;
    color: var(--gold);
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
}

.date-display {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.day-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
}

.next-day-btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--blue);
    color: white;
    border-radius: 7px;
    text-decoration: none;
    font-weight: 900;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.next-day-btn:hover {
    background: #0c5cab;
    transform: scale(1.05);
}

/* Workouts Page */
.workout-full {
    grid-column: span 2;
}

.workout-list {
    list-style: none;
    padding: 0;
}

.workout-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin: 0;
}

.workout-list li:last-child {
    border-bottom: none;
}

.exercise-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    background: var(--blue);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 900;
    color: white;
}

.workout-tips {
    grid-column: span 2;
}

.tip-list {
    list-style: none;
    padding: 0;
}

.tip-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--muted);
    font-size: 0.9rem;
}

.tip-list li:last-child {
    border-bottom: none;
}

/* Meals Page */
.page-title {
    margin: 0 22px 18px;
    font-size: 1.8rem;
    color: var(--gold);
}

.meal-card {
    border-left: 4px solid var(--gold);
}

.meal-card:nth-child(2) {
    border-left-color: #43d17a;
}

.meal-card:nth-child(3) {
    border-left-color: #f5c842;
}

.meal-card:nth-child(4) {
    border-left-color: #ff8e8e;
}

.meal-list {
    list-style: none;
    padding: 0;
}

.meal-list li {
    padding: 6px 0;
    color: #dce8f5;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.meal-list li:last-child {
    border-bottom: none;
}

.meal-list.small li {
    font-size: 0.85rem;
    padding: 4px 0;
}

.meal-preview {
    grid-column: span 2;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 15px 0;
}

.preview-meal {
    background: rgba(11, 27, 45, 0.5);
    padding: 12px 16px;
    border-radius: 8px;
}

.meal-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--gold);
    margin-bottom: 6px;
}

.nutrition-tips {
    grid-column: span 2;
}

/* View All Button */
.view-all-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 20px;
    background: var(--blue);
    color: white;
    border-radius: 7px;
    text-decoration: none;
    font-weight: 900;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: #0c5cab;
    transform: scale(1.02);
}

/* Settings Panel Styles */
.settings-panel {
    grid-column: span 2;
}

.settings-content {
    margin-top: 10px;
}

.danger-zone {
    border: 1px solid #d9342b;
    border-radius: 8px;
    padding: 16px;
    background: rgba(217, 52, 43, 0.05);
    margin-top: 5px;
}

.danger-zone h4 {
    color: #ff8e8e;
    margin: 0 0 8px 0;
    font-size: 1rem;
}

.danger-btn {
    background: #d9342b;
    color: white;
    font-weight: 900;
    padding: 12px 20px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
    min-width: 180px;
}

.danger-btn:hover {
    background: #b82a22;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(217, 52, 43, 0.3);
}

.danger-btn:active {
    transform: scale(0.98);
}

/* Video anti-skip visual feedback */
.video-status {
    transition: all 0.3s ease;
}

.video-status.error {
    color: #ff8e8e;
    background: rgba(217, 52, 43, 0.1);
}

.lock {
    transition: all 0.3s ease;
}

.lock.unlocked {
    background: #1a3a1a;
    color: #43d17a;
}

/* Wipe confirmation animations */
#wipeConfirmation {
    animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#wipeResult {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 800px) {
    .top {
        padding: 18px 14px
    }
    .ua-mark {
        width: 68px;
        height: 68px
    }
    .ua-mark span {
        font-size: 1.5rem
    }
    .rank {
        width: 70px;
        height: 70px
    }
    .rank b {
        font-size: 2rem
    }
    .hero-banner {
        margin: 0 12px 14px;
        display: block;
        padding: 18px
    }
    .stats {
        margin-top: 18px;
        justify-content: space-between
    }
    .rank-road {
        margin: 0 12px 14px
    }
    .grid {
        grid-template-columns: 1fr;
        padding: 0 12px
    }
    .video-card {
        grid-column: auto
    }
    .habits {
        grid-template-columns: 1fr
    }
    h1 {
        font-size: 2.25rem
    }
    
    .main-nav {
        margin: 0 12px 14px;
        padding: 8px 12px;
        gap: 6px;
    }
    
    .nav-link {
        padding: 8px 14px;
        font-size: 0.78rem;
    }
    
    .clock-banner {
        margin: 0 12px 14px;
        padding: 14px 16px;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .time {
        font-size: 1.6rem;
    }
    
    .date-display {
        font-size: 0.75rem;
    }
    
    .page-title {
        margin: 0 12px 14px;
        font-size: 1.4rem;
    }
    
    .workout-full {
        grid-column: auto;
    }
    
    .workout-tips {
        grid-column: auto;
    }
    
    .meal-preview {
        grid-column: auto;
    }
    
    .nutrition-tips {
        grid-column: auto;
    }
    
    .settings-panel {
        grid-column: auto;
    }
    
    .preview-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .day-navigation {
        justify-content: center;
    }
    
    .clock-display {
        justify-content: center;
    }
}