* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Google Sans Flex', 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-app: #ffffff;
    --bg-surface: #f6f7f9;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: rgba(15, 23, 42, 0.07);
    --card-bg: #f4f5f7;
    --card-border: rgba(15, 23, 42, 0.06);
    --nav-bg: rgba(255, 255, 255, 0.92);
    --toast-bg: rgba(15, 23, 42, 0.94);
    --toast-text: #ffffff;
    --select-bg: #ffffff;
    --select-border: rgba(15, 23, 42, 0.12);
    --toggle-bg: #d4d8dd;
    --config-border: rgba(15, 23, 42, 0.06);
    --config-text: #334155;
    --config-credit: #94a3b8;
    --shadow-color: rgba(15, 23, 42, 0.08);
    --accent: #0055D4;
    --accent-soft: rgba(0, 85, 212, 0.1);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.08);
    --star-empty-fill: transparent;
    --star-empty-stroke: #d4d8dd;
    --star-pending-fill: #e5e7eb;
    --star-pending-stroke: #fbbf24;
    --star-active-fill: #fbbf24;
    --star-active-stroke: #fbbf24;
    --star-hover-stroke: #fbbf24;
    --modal-overlay: rgba(15, 23, 42, 0.45);
    --modal-card: #ffffff;
    --page-bg: #eef1f5;
    --side-menu-bg: #ffffff;
    --auth-input-bg: #f4f5f7;
    --auth-screen-bg: #ffffff;

    --odesoft-red: #C8284E;
    --odesoft-yellow: #F5B21A;
    --odesoft-green: #25A55F;
    --odesoft-blue: #199CE5;

    --loader-dot-1: var(--odesoft-red);
    --loader-dot-2: var(--odesoft-yellow);
    --loader-dot-3: var(--odesoft-green);
    --loader-dot-4: var(--odesoft-blue);

    --rank-gold: #C9A227;
    --rank-gold-soft: rgba(201, 162, 39, 0.12);
    --rank-silver: #8E959E;
    --rank-silver-soft: rgba(142, 149, 158, 0.12);
    --rank-bronze: #A66A3C;
    --rank-bronze-soft: rgba(166, 106, 60, 0.12);

    --chat-user-bg: var(--accent);
    --chat-user-text: #ffffff;
    --chat-admin-bg: var(--card-bg);
    --chat-admin-text: var(--text-primary);
}

html.theme-dark {
    --bg-app: #1a1a1a;
    --bg-surface: #0f0f0f;
    --text-primary: #f1f3f4;
    --text-secondary: #9aa0a6;
    --text-muted: #5f6368;
    --border-color: rgba(255, 255, 255, 0.08);
    --card-bg: #2a2a2a;
    --card-border: rgba(255, 255, 255, 0.06);
    --nav-bg: rgba(26, 26, 26, 0.94);
    --toast-bg: rgba(241, 243, 244, 0.95);
    --toast-text: #1a1a1a;
    --select-bg: #2a2a2a;
    --select-border: rgba(255, 255, 255, 0.12);
    --toggle-bg: #3c4043;
    --config-border: rgba(255, 255, 255, 0.06);
    --config-text: #e8eaed;
    --config-credit: #5f6368;
    --shadow-color: rgba(0, 0, 0, 0.55);
    --accent-soft: rgba(0, 85, 212, 0.2);
    --danger-soft: rgba(239, 68, 68, 0.16);
    --star-empty-stroke: #5f6368;
    --star-pending-fill: #3c4043;
    --star-pending-stroke: #fbbf24;
    --star-active-fill: #fbbf24;
    --star-active-stroke: #fbbf24;
    --star-hover-stroke: #fbbf24;
    --modal-overlay: rgba(0, 0, 0, 0.7);
    --modal-card: #2a2a2a;
    --page-bg: #0f0f0f;
    --side-menu-bg: #1a1a1a;
    --auth-input-bg: #2a2a2a;
    --auth-screen-bg: #1a1a1a;

    --rank-gold-soft: rgba(201, 162, 39, 0.18);
    --rank-silver-soft: rgba(142, 149, 158, 0.18);
    --rank-bronze-soft: rgba(166, 106, 60, 0.18);

    --chat-user-bg: var(--accent);
    --chat-user-text: #ffffff;
    --chat-admin-bg: #2a2a2a;
    --chat-admin-text: #f1f3f4;
}

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--page-bg);
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}

.splash-screen {
    position: fixed;
    inset: 0;
    background: #272727;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 40px 24px 80px;
    animation: splashEnter 0.6s ease;
    position: relative;
}

@keyframes splashEnter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.splash-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 26px;
    margin-bottom: auto;
    margin-top: auto;
}

.splash-from {
    font-size: 15px;
    font-weight: 500;
    color: #9aa0a6;
    letter-spacing: 3px;
    margin-bottom: 6px;
    line-height: 1;
}

.splash-company {
    font-size: 25px;
    font-weight: 500;
    color: #b1b1b1;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

.splash-company .company-dark {
    color: ##b1b1b1;
    font-weight: 600;
}

.splash-company .company-light {
    color: ##b1b1b1;
    font-weight: 500;
}

.app-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--bg-app);
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    position: relative;
    padding-top: env(safe-area-inset-top, 8px);
    padding-bottom: env(safe-area-inset-bottom, 0);
    transition: background 0.3s ease;
}

.app-header {
    padding: 12px 16px 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-app);
    width: 100%;
    min-height: 56px;
    position: relative;
    z-index: 10;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.header-center {
    flex: 1;
    text-align: center;
    padding: 0 40px;
    overflow: hidden;
    white-space: nowrap;
}

.header-center .logo {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.header-center .sub-logo {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 1.2px;
    margin-top: 1px;
    text-transform: uppercase;
}

.menu-btn {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease, transform 0.1s ease;
    outline: none;
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    z-index: 11;
}

.menu-btn:focus { outline: none; }

.menu-btn svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    transition: stroke 0.2s ease;
    display: block;
}

.menu-btn:hover {
    background: var(--card-bg);
    color: var(--text-primary);
}

.menu-btn:active {
    transform: translateY(-50%) scale(0.92);
}

.notification-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease, transform 0.1s ease;
    outline: none;
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    z-index: 11;
}

.notification-btn:focus { outline: none; }

.notification-btn svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    transition: stroke 0.2s ease;
    display: block;
}

.notification-btn:hover:not(.notification-btn-disabled) {
    background: var(--card-bg);
    color: var(--text-primary);
}

.notification-btn:active:not(.notification-btn-disabled) {
    transform: translateY(-50%) scale(0.92);
}

.notification-btn-disabled,
.notification-btn:disabled {
    opacity: 0.32;
    cursor: not-allowed;
    pointer-events: none;
}

.views-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    min-height: 0;
    height: 100%;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 16px 16px;
    flex: 1;
    min-height: 0;
    animation: fadeIn 0.4s ease;
    overflow: hidden;
    height: 100%;
}

.screen.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.circle-btn-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 6px 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.circle-btn {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    background: var(--bg-app);
    padding: 3px;
    background-clip: padding-box;
    border: solid 3px transparent;
    position: relative;
    transition: transform 0.15s, box-shadow 0.3s, border-color 0.5s ease, background 0.3s ease;
    user-select: none;
    z-index: 2;
    outline: none;
    box-shadow: 0 8px 30px rgba(0, 85, 212, 0.08);
}

.circle-btn:focus { outline: none; }

.circle-btn::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(from 0deg,
        var(--odesoft-red),
        var(--odesoft-yellow),
        var(--odesoft-green),
        var(--odesoft-blue),
        var(--odesoft-red));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.circle-btn.connection-online { border-color: var(--odesoft-green) !important; box-shadow: 0 8px 30px rgba(37, 165, 95, 0.15); }
.circle-btn.connection-online::before { opacity: 0; }
.circle-btn.connection-unstable { border-color: var(--odesoft-yellow) !important; box-shadow: 0 8px 30px rgba(245, 178, 26, 0.15); }
.circle-btn.connection-unstable::before { opacity: 0; }
.circle-btn.connection-offline { border-color: var(--odesoft-red) !important; box-shadow: 0 8px 30px rgba(200, 40, 78, 0.15); }
.circle-btn.connection-offline::before { opacity: 0; }
.circle-btn:not(.connection-online):not(.connection-unstable):not(.connection-offline)::before { opacity: 1; }

.circle-btn .inner-text {
    position: relative;
    z-index: 1;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.ripple-effect {
    --ripple-color: rgba(200, 40, 78, 0.55);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--ripple-color);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: border-color 0.3s ease;
}

.ripple-effect.active {
    animation: rippleAnimation 1.2s ease-out forwards;
}

@keyframes rippleAnimation {
    0% {
        width: 150px;
        height: 150px;
        opacity: 0.8;
        border-color: var(--ripple-color);
    }
    100% {
        width: 280px;
        height: 280px;
        opacity: 0;
        border-color: transparent;
    }
}

.circle-btn:active { transform: scale(0.92); }
.circle-btn.no-click { cursor: default; opacity: 0.7; }
.circle-btn.no-click:active { transform: none; }

.bottom-stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 8px;
    padding: 0 4px;
    flex-shrink: 0;
}

.stat-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1;
}

.stat-circle .icon-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.stat-circle .icon-circle svg {
    width: 22px;
    height: 22px;
    stroke: var(--text-primary);
    stroke-width: 1.6;
}

.stat-circle .label {
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 0.4px;
    margin-top: 2px;
    text-transform: uppercase;
    font-weight: 500;
}

.stat-circle .value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.speed-display { text-align: center; margin-bottom: 4px; flex-shrink: 0; }

.speed-number {
    font-size: 56px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -1.5px;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.speed-unit {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.google-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 40px;
    margin: 18px 0 10px;
    flex-shrink: 0;
}

.google-loader .loader-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: googleBounce 1.4s infinite ease-in-out both;
}

.google-loader .loader-dot:nth-child(1) {
    background-color: var(--loader-dot-1);
    animation-delay: -0.32s;
}
.google-loader .loader-dot:nth-child(2) {
    background-color: var(--loader-dot-2);
    animation-delay: -0.16s;
}
.google-loader .loader-dot:nth-child(3) {
    background-color: var(--loader-dot-3);
    animation-delay: 0s;
}
.google-loader .loader-dot:nth-child(4) {
    background-color: var(--loader-dot-4);
    animation-delay: 0.16s;
}

@keyframes googleBounce {
    0%, 80%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    40% {
        transform: translateY(-10px) scale(1.15);
        opacity: 1;
    }
}

.status-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.2px;
    margin-top: 4px;
    flex-shrink: 0;
}

.results-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin: 14px 0 8px;
    padding: 0 2px;
    flex-shrink: 0;
}

.rating-section {
    text-align: center;
    margin: 6px 0 8px;
    width: 100%;
    flex-shrink: 0;
}

.rating-section .rating-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.rating-status {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    min-height: 14px;
    margin-bottom: 4px;
    letter-spacing: 0.2px;
    transition: color 0.2s ease;
}

.rating-status.success {
    color: var(--odesoft-green);
}

.rating-status.warning {
    color: var(--odesoft-yellow);
}

.stars {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.stars .star {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    outline: none;
    transition: transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.stars .star:focus { outline: none; }

.stars .star svg {
    width: 100%;
    height: 100%;
    display: block;
    transition: fill 0.15s ease, stroke 0.15s ease;
}

.stars .star svg path {
    fill: var(--star-empty-fill);
    stroke: var(--star-empty-stroke);
    stroke-width: 1.5;
    stroke-linejoin: round;
    stroke-linecap: round;
    transition: fill 0.15s ease, stroke 0.15s ease;
}

.stars .star:hover svg path,
.stars .star.hover svg path {
    stroke: var(--star-hover-stroke);
}

.stars .star.filled svg path {
    fill: var(--star-active-fill);
    stroke: var(--star-active-stroke);
}

.stars .star.pending svg path {
    fill: var(--star-pending-fill);
    stroke: var(--star-pending-stroke);
}

.stars.locked {
    pointer-events: none;
}

.stars.locked .star {
    cursor: default;
}

.restart-btn {
    background: none;
    border: 1px solid var(--select-border);
    border-radius: 40px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
    margin-top: 6px;
    letter-spacing: 0.3px;
    width: 100%;
    max-width: 300px;
    flex-shrink: 0;
    outline: none;
}

.restart-btn:focus { outline: none; }
.restart-btn:hover { background: var(--card-bg); border-color: var(--text-secondary); }
.restart-btn:active { transform: scale(0.97); }

#screen-history {
    padding: 16px 16px 8px;
    justify-content: flex-start;
    overflow: hidden;
    align-items: center;
}

.history-panel {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 12px;
    padding: 0 4px;
    flex-shrink: 0;
    position: relative;
    min-height: 38px;
}

.history-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    text-align: center;
    width: 100%;
    white-space: nowrap;
}

.history-clear-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    z-index: 1;
}

.history-clear-btn:hover {
    background: var(--danger-soft);
    border-color: rgba(239, 68, 68, 0.25);
}

.history-clear-btn:active { transform: translateY(-50%) scale(0.92); }

.history-clear-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
    stroke-width: 2;
    transition: stroke 0.2s ease;
}

.history-clear-btn:hover svg {
    stroke: var(--danger);
}

.history-expiry-info {
    width: 100%;
    text-align: center;
    padding: 0 12px;
    margin-bottom: 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.1px;
    line-height: 1.5;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.history-expiry-info:empty {
    display: none;
    margin-bottom: 0;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding: 2px 4px 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--card-border) transparent;
}

.history-list::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-track {
    background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

.history-list:empty {
    display: none;
}

.history-day-separator {
    display: flex;
    justify-content: center;
    margin: 8px 0 12px;
    flex-shrink: 0;
}

.history-day-separator:first-child {
    margin-top: 0;
}

.history-day-separator span {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.history-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.1s ease;
    animation: historyItemEnter 0.3s ease;
}

@keyframes historyItemEnter {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.history-item:active {
    transform: scale(0.99);
}

.history-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.history-item-time {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.1px;
}

.history-item-speeds {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.history-speed-block {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 8px;
    background: var(--card-bg);
}

.history-speed-block svg {
    width: 12px;
    height: 12px;
    stroke-width: 2.5;
    flex-shrink: 0;
}

.history-speed-block.download svg {
    stroke: var(--odesoft-blue);
}

.history-speed-block.upload svg {
    stroke: var(--odesoft-green);
}

.history-speed-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    font-variant-numeric: tabular-nums;
}

.history-item-bottom {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.history-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.1px;
}

.history-meta svg {
    width: 12px;
    height: 12px;
    stroke: var(--text-muted);
    stroke-width: 2;
    flex-shrink: 0;
}

.history-meta-value {
    color: var(--text-primary);
    font-weight: 600;
}

.history-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    flex: 1;
    min-height: 0;
}

.history-empty.visible {
    display: flex;
}

.history-empty-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    opacity: 0.4;
}

.history-empty-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--text-muted);
    stroke-width: 1.5;
}

.history-empty-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.history-empty-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 260px;
    font-weight: 400;
}

#screen-top {
    padding: 16px 16px 8px;
    justify-content: flex-start;
    overflow: hidden;
    align-items: center;
}

.top-panel {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.top-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 12px;
    padding: 0 4px;
    flex-shrink: 0;
    min-height: 38px;
}

.top-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    text-align: center;
    width: 100%;
    white-space: nowrap;
}

.top-tabs {
    display: flex;
    gap: 6px;
    width: 100%;
    padding: 4px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.top-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
    outline: none;
    font-family: inherit;
    letter-spacing: 0.1px;
    -webkit-tap-highlight-color: transparent;
}

.top-tab:focus { outline: none; }

.top-tab.active {
    background: var(--bg-app);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.top-tab:active {
    transform: scale(0.97);
}

.top-info {
    width: 100%;
    text-align: center;
    padding: 0 12px;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.1px;
    line-height: 1.5;
    flex-shrink: 0;
}

.top-info:empty {
    display: none;
    margin-bottom: 0;
}

.top-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding: 2px 4px 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--card-border) transparent;
}

.top-list::-webkit-scrollbar {
    width: 4px;
}

.top-list::-webkit-scrollbar-track {
    background: transparent;
}

.top-list::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

.top-list:empty {
    display: none;
}

.top-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.1s ease;
    animation: historyItemEnter 0.3s ease;
    position: relative;
}

.top-item:active {
    transform: scale(0.99);
}

.top-rank {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.top-rank-number {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: -0.2px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.top-item.rank-1 .top-rank {
    background: var(--rank-gold-soft);
    border-color: var(--rank-gold);
}
.top-item.rank-1 .top-rank-number {
    color: var(--rank-gold);
}

.top-item.rank-2 .top-rank {
    background: var(--rank-silver-soft);
    border-color: var(--rank-silver);
}
.top-item.rank-2 .top-rank-number {
    color: var(--rank-silver);
}

.top-item.rank-3 .top-rank {
    background: var(--rank-bronze-soft);
    border-color: var(--rank-bronze);
}
.top-item.rank-3 .top-rank-number {
    color: var(--rank-bronze);
}

.top-logo-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    background: transparent;
    padding: 0;
    border-radius: 50%;
}

.top-logo-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    font-family: inherit;
    position: absolute;
    top: 0;
    left: 0;
}

.top-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.top-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.1px;
    flex-wrap: wrap;
}

.top-meta-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

.top-meta-item svg {
    width: 11px;
    height: 11px;
    stroke: var(--text-muted);
    stroke-width: 2;
    flex-shrink: 0;
}

.top-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
    min-width: 54px;
}

.top-average {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    font-variant-numeric: tabular-nums;
}

.top-stars-mini {
    display: flex;
    align-items: center;
    gap: 1px;
    margin-top: 2px;
}

.top-stars-mini svg {
    width: 9px;
    height: 9px;
    display: block;
}

.top-stars-mini svg path {
    fill: var(--star-empty-fill);
    stroke: var(--star-empty-stroke);
    stroke-width: 1.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.top-stars-mini svg.filled path {
    fill: var(--star-active-fill);
    stroke: var(--star-active-stroke);
}

.top-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    flex: 1;
    min-height: 0;
}

.top-empty.visible {
    display: flex;
}

.top-empty-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    opacity: 0.4;
}

.top-empty-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--text-muted);
    stroke-width: 1.5;
}

.top-empty-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.top-empty-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 260px;
    font-weight: 400;
}

#screen-config {
    padding: 16px 20px 20px;
    justify-content: flex-start;
    overflow-y: auto;
    align-items: center;
}

.config-panel {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0 20px;
}

.config-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 16px;
    padding: 0;
}

.config-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    text-align: center;
    line-height: 1.2;
}

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--config-border);
    min-height: 58px;
    transition: border-color 0.3s ease;
}

.config-item:last-of-type {
    border-bottom: none;
}

.config-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--config-text);
    letter-spacing: 0.1px;
    flex: 1;
    margin-right: 16px;
    transition: color 0.3s ease;
}

.config-item-action {
    background: none;
    border: none;
    border-bottom: 1px solid var(--config-border);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    outline: none;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
}

.config-item-action:hover {
    background: var(--card-bg);
}

.config-item-action:active {
    background: var(--bg-surface);
}

.config-item-action .config-label {
    color: var(--accent);
    font-weight: 600;
}

.config-item-chevron {
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    stroke-width: 2;
    flex-shrink: 0;
    transition: stroke 0.2s ease;
}

.config-item-action:hover .config-item-chevron {
    stroke: var(--text-primary);
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 30px;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--toggle-bg);
    transition: 0.3s;
    border-radius: 30px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: #ffffff;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.config-about {
    margin-top: 20px;
    padding: 20px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-align: center;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.about-company {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    margin-bottom: 8px;
}

.about-description {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 14px;
    text-align: left;
}

.about-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--accent);
    border: none;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.2px;
    width: 100%;
}

.about-btn:hover { background: #0046ad; }
.about-btn:active { transform: scale(0.97); }

.about-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
}

.config-info {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--config-border);
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.8;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.config-info p { margin: 2px 0; }

.config-credit {
    font-size: 11px;
    color: var(--config-credit);
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

#screen-admin {
    padding: 16px 16px 8px;
    justify-content: flex-start;
    overflow: hidden;
    align-items: center;
}

.admin-panel {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.admin-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 12px;
    padding: 0 4px;
    flex-shrink: 0;
    min-height: 38px;
}

.admin-back-btn {
    background: none;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.2s ease, transform 0.1s ease;
    flex-shrink: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.admin-back-btn:hover {
    background: var(--card-bg);
}

.admin-back-btn:active {
    transform: scale(0.92);
}

.admin-back-btn svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    display: block;
}

.admin-title {
    flex: 1;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.admin-tabs {
    display: flex;
    gap: 6px;
    width: 100%;
    padding: 4px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.admin-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
    outline: none;
    font-family: inherit;
    letter-spacing: 0.1px;
    -webkit-tap-highlight-color: transparent;
}

.admin-tab:focus { outline: none; }

.admin-tab.active {
    background: var(--bg-app);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.admin-tab:active {
    transform: scale(0.97);
}

.admin-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.admin-search-wrap {
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

.admin-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    stroke-width: 2;
    pointer-events: none;
}

.admin-search-input {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px 14px 12px 42px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
    letter-spacing: 0.1px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.admin-search-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.admin-search-input:focus {
    border-color: var(--accent);
    background: var(--bg-app);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding: 2px 4px 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--card-border) transparent;
}

.admin-list::-webkit-scrollbar {
    width: 4px;
}

.admin-list::-webkit-scrollbar-track {
    background: transparent;
}

.admin-list::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

.admin-user-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.1s ease;
    animation: historyItemEnter 0.3s ease;
}

.admin-user-item:active {
    transform: scale(0.99);
}

.admin-user-item.current {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.admin-user-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
}

.admin-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--card-bg);
    display: block;
}

.admin-user-avatar-fallback {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.verified-check {
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.25));
    z-index: 2;
    pointer-events: none;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.verified-check svg {
    width: 100%;
    height: 100%;
    display: block;
}

.admin-user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-user-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.admin-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.admin-role-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
}

.admin-role-badge.role-admin {
    background: rgba(200, 40, 78, 0.12);
    color: var(--odesoft-red);
}

.admin-role-badge.role-support {
    background: rgba(25, 156, 229, 0.12);
    color: var(--odesoft-blue);
}

.admin-user-email {
    font-size: 11.5px;
    color: var(--text-secondary);
    letter-spacing: 0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-date {
    font-size: 10.5px;
    color: var(--text-muted);
    letter-spacing: 0.1px;
}

.admin-user-actions-btn {
    background: none;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
    flex-shrink: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.admin-user-actions-btn:hover {
    background: var(--card-bg);
    color: var(--text-primary);
}

.admin-user-actions-btn:active {
    transform: scale(0.9);
}

.admin-user-actions-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.admin-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    flex: 1;
    min-height: 0;
}

.admin-empty-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    opacity: 0.4;
}

.admin-empty-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--text-muted);
    stroke-width: 1.5;
}

.admin-empty-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.admin-empty-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 260px;
    font-weight: 400;
}

.admin-chat-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
    animation: historyItemEnter 0.3s ease;
    position: relative;
}

.admin-chat-item:hover {
    background: var(--card-bg);
}

.admin-chat-item:active {
    transform: scale(0.99);
}

.admin-chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.admin-chat-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-chat-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-chat-email {
    font-size: 11.5px;
    color: var(--text-secondary);
    letter-spacing: 0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-chat-preview {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.admin-chat-badge {
    background: var(--danger);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    flex-shrink: 0;
    letter-spacing: 0;
}

#screen-support {
    padding: 0;
    justify-content: flex-start;
    overflow: hidden;
    align-items: stretch;
}

.support-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.support-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-app);
    flex-shrink: 0;
    min-height: 56px;
}

.support-back-btn {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.2s ease, transform 0.1s ease;
    flex-shrink: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.support-back-btn:hover {
    background: var(--card-bg);
}

.support-back-btn:active {
    transform: scale(0.92);
}

.support-back-btn svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    display: block;
}

.support-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.support-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-subtitle {
    font-size: 11.5px;
    color: var(--odesoft-green);
    font-weight: 500;
    letter-spacing: 0.1px;
}

.support-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--card-border) transparent;
}

.support-messages::-webkit-scrollbar {
    width: 4px;
}

.support-messages::-webkit-scrollbar-track {
    background: transparent;
}

.support-messages::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

.support-day-separator {
    display: flex;
    justify-content: center;
    margin: 8px 0;
    flex-shrink: 0;
}

.support-day-separator span {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.support-message-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
    margin-bottom: 2px;
}

.support-message-row-mine {
    flex-direction: row-reverse;
}

.support-message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    position: relative;
}

.support-message-avatar-empty {
    background: transparent;
    visibility: hidden;
}

.support-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.support-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.support-message {
    max-width: calc(78% - 36px);
    padding: 10px 14px;
    border-radius: 16px;
    background: var(--chat-admin-bg);
    color: var(--chat-admin-text);
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: historyItemEnter 0.25s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    border-bottom-left-radius: 4px;
}

.support-message-mine {
    background: var(--chat-user-bg);
    color: var(--chat-user-text);
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 16px;
}

.support-message-text {
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: 0.1px;
    white-space: pre-wrap;
}

.support-message-time {
    font-size: 10px;
    opacity: 0.7;
    letter-spacing: 0.2px;
    align-self: flex-end;
    margin-top: 2px;
}

.support-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    flex: 1;
    min-height: 0;
}

.support-empty-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    opacity: 0.4;
}

.support-empty-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--text-muted);
    stroke-width: 1.5;
}

.support-empty-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.support-empty-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 260px;
    font-weight: 400;
}

.support-input-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0));
    border-top: 1px solid var(--border-color);
    background: var(--bg-app);
    flex-shrink: 0;
}

.support-input {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 22px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
    letter-spacing: 0.1px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    min-width: 0;
}

.support-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.support-input:focus {
    border-color: var(--accent);
    background: var(--bg-app);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.support-send-btn {
    background: var(--accent);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: background 0.2s ease, transform 0.1s ease;
    flex-shrink: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.support-send-btn:hover {
    background: #0046ad;
}

.support-send-btn:active {
    transform: scale(0.92);
}

.support-send-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    display: block;
}

.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 8px 0 12px;
    flex-shrink: 0;
    width: 100%;
    margin-top: auto;
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.bottom-nav.hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 9.5px;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.2s, opacity 0.3s;
    min-width: 40px;
    flex: 1;
    outline: none;
}

.nav-item:focus { outline: none; }

.nav-item svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    transition: stroke 0.2s;
    stroke-width: 1.8;
}

.nav-item span {
    font-weight: 500;
    letter-spacing: 0.2px;
}

.nav-item.active { color: var(--accent); }
.nav-item.active svg { stroke: var(--accent); }

.nav-item-disabled,
.nav-item:disabled {
    opacity: 0.32;
    cursor: not-allowed;
    pointer-events: none;
}

.toast-notification {
    position: fixed;
    top: -80px;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    max-width: 420px;
    width: 90%;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--toast-text);
    z-index: 9999;
    transition: top 0.6s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.5s ease, transform 0.5s ease;
    opacity: 0;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
    letter-spacing: 0.2px;
    cursor: default;
    background: var(--toast-bg);
}

.toast-notification.show {
    top: 24px;
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--modal-overlay);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, background 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    position: relative;
    background: var(--modal-card);
    border-radius: 20px;
    max-width: 420px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 28px 24px 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1), background 0.3s ease;
    border: 1px solid var(--border-color);
}

.modal-overlay.active .modal-card {
    transform: translateY(0) scale(1);
}

.modal-card-user-actions {
    max-width: 360px;
    padding: 20px 20px 16px;
}

.modal-card-user-actions .modal-title {
    padding-right: 0;
    margin-bottom: 12px;
    font-size: 16px;
}

.user-actions-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    background: none;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    letter-spacing: 0.1px;
    outline: none;
    text-align: left;
    font-family: inherit;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
}

.user-action-item:hover {
    background: var(--card-bg);
}

.user-action-item:active {
    background: var(--bg-surface);
}

.user-action-item svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
    flex-shrink: 0;
    transition: stroke 0.2s ease;
}

.user-action-item:hover svg {
    stroke: var(--text-primary);
}

.user-action-item span {
    flex: 1;
}

.user-action-danger {
    color: var(--danger);
}

.user-action-danger svg {
    stroke: var(--danger);
}

.user-action-danger:hover {
    background: var(--danger-soft);
}

.user-action-danger:hover svg {
    stroke: var(--danger);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--card-bg);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.modal-close:hover { background: var(--card-border); }
.modal-close:active { transform: scale(0.92); }

.modal-close svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-secondary);
    stroke-width: 2;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin-bottom: 16px;
    padding-right: 30px;
}

.modal-body p {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-align: left;
}

.modal-body p:last-child { margin-bottom: 0; }

.modal-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-card-confirm {
    max-width: 360px;
    padding: 24px 24px 20px;
}

.modal-card-confirm .modal-title {
    padding-right: 0;
    margin-bottom: 12px;
    font-size: 17px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.modal-btn {
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, border-color 0.2s;
    letter-spacing: 0.2px;
    outline: none;
    min-width: 90px;
    height: 42px;
    font-family: inherit;
}

.modal-btn:focus { outline: none; }
.modal-btn:active { transform: scale(0.97); }

.modal-btn-primary {
    background: var(--accent);
    color: #ffffff;
}

.modal-btn-primary:hover {
    background: #0046ad;
}

.modal-btn-secondary {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
}

.modal-btn-secondary:hover {
    background: var(--bg-surface);
    border-color: var(--text-muted);
}

.modal-btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.modal-btn-danger:hover {
    background: #dc2626;
}

.side-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.side-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    width: 82%;
    max-width: 340px;
    background: var(--side-menu-bg);
    z-index: 10002;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.15);
    padding-top: env(safe-area-inset-top, 8px);
    padding-bottom: env(safe-area-inset-bottom, 8px);
}

.side-menu.active {
    transform: translateX(0);
}

.side-menu-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 20px 20px;
    -webkit-overflow-scrolling: touch;
}

.side-menu-guest,
.side-menu-user {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.side-menu-brand {
    text-align: center;
    padding: 8px 0 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.side-menu-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    margin-bottom: 6px;
}

.side-menu-subtitle {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 240px;
    margin: 0 auto;
}

.side-menu-auth {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 30px;
    padding: 12px 18px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.1s, box-shadow 0.2s;
    letter-spacing: 0.1px;
    outline: none;
    border: none;
    width: 100%;
    font-family: inherit;
    min-height: 48px;
}

.auth-btn:focus { outline: none; }
.auth-btn:active { transform: scale(0.98); }

.auth-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-btn-google {
    background: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.auth-btn-google:hover {
    background: #f8f9fa;
    border-color: #c6c9cc;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}

.auth-btn-email {
    background: var(--accent);
    color: #ffffff;
}

.auth-btn-email:hover {
    background: #0046ad;
}

.auth-btn-email svg {
    stroke: #ffffff;
}

.side-menu-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 0 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.user-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    margin-bottom: 4px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-email {
    font-size: 12.5px;
    color: var(--text-secondary);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-menu-nav {
    display: none;
}

.side-menu-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: none;
    border: none;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    letter-spacing: 0.1px;
    outline: none;
    text-align: left;
    font-family: inherit;
    width: 100%;
}

.side-menu-item:hover:not(.side-menu-item-disabled):not(:disabled) {
    background: var(--card-bg);
}

.side-menu-item:active:not(.side-menu-item-disabled):not(:disabled) {
    background: var(--bg-surface);
}

.side-menu-item svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
    flex-shrink: 0;
    transition: stroke 0.2s ease;
}

.side-menu-item:hover:not(.side-menu-item-disabled):not(:disabled) svg {
    stroke: var(--text-primary);
}

.side-menu-item span {
    flex: 1;
    transition: color 0.2s ease;
}

.side-menu-item-disabled,
.side-menu-item:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.side-menu-item-logout svg {
    stroke: var(--text-secondary);
}

.side-menu-item-logout:hover:not(:disabled):not(.disabled) {
    background: var(--danger-soft);
}

.side-menu-item-logout:hover:not(:disabled):not(.disabled) svg {
    stroke: var(--danger);
}

.side-menu-item-logout:hover:not(:disabled):not(.disabled) span {
    color: var(--danger);
}

.side-menu-item-logout.disabled,
.side-menu-item-logout:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.side-menu-item-logout.disabled:hover,
.side-menu-item-logout:disabled:hover {
    background: none;
}

.side-menu-item-logout.disabled svg,
.side-menu-item-logout:disabled svg {
    stroke: var(--text-secondary);
}

.side-menu-item-logout.disabled span,
.side-menu-item-logout:disabled span {
    color: var(--text-primary);
}

.user-id-item {
    padding-right: 12px;
}

.user-id-item span {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    font-weight: 500;
    color: var(--text-primary);
}

.user-id-item .user-id-copy-icon {
    width: 16px;
    height: 16px;
    stroke: var(--text-muted);
    flex-shrink: 0;
    margin-left: auto;
    transition: stroke 0.2s ease, transform 0.1s ease;
    opacity: 0.7;
}

.user-id-item:hover:not(.side-menu-item-disabled):not(:disabled) .user-id-copy-icon {
    stroke: var(--accent);
    opacity: 1;
}

.user-id-item:active:not(.side-menu-item-disabled):not(:disabled) .user-id-copy-icon {
    transform: scale(0.9);
}

.user-id-item.copied .user-id-copy-icon {
    stroke: var(--odesoft-green);
    opacity: 1;
}

.auth-screen {
    position: fixed;
    inset: 0;
    background: var(--auth-screen-bg);
    z-index: 10003;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: env(safe-area-inset-top, 8px);
    padding-bottom: env(safe-area-inset-bottom, 16px);
}

.auth-screen.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.auth-screen-header {
    display: flex;
    align-items: center;
    padding: 12px 16px 8px;
    flex-shrink: 0;
    min-height: 56px;
}

.auth-back-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease, transform 0.1s ease;
    outline: none;
    width: 40px;
    height: 40px;
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
}

.auth-back-btn:focus { outline: none; }

.auth-back-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    display: block;
}

.auth-back-btn:hover {
    background: var(--card-bg);
}

.auth-back-btn:active {
    transform: scale(0.92);
}

.auth-screen-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 20px 28px 40px;
    animation: authContentEnter 0.4s ease;
}

@keyframes authContentEnter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-screen-brand {
    margin-bottom: 32px;
}

.auth-screen-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.15;
    margin-bottom: 8px;
}

.auth-screen-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.5;
    letter-spacing: 0.1px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-input-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.1px;
    padding-left: 4px;
}

.auth-input {
    width: 100%;
    background: var(--auth-input-bg);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    font-family: inherit;
    letter-spacing: 0.1px;
}

.auth-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.auth-input:focus {
    border-color: var(--accent);
    background: var(--bg-app);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-error {
    font-size: 12.5px;
    color: var(--danger);
    min-height: 18px;
    margin: -6px 0 0;
    line-height: 1.4;
    letter-spacing: 0.1px;
    padding-left: 4px;
}

.auth-submit {
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 15px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.2px;
    outline: none;
    font-family: inherit;
    min-height: 52px;
    width: 100%;
    margin-top: 4px;
}

.auth-submit:hover {
    background: #0046ad;
}

.auth-submit:active {
    transform: scale(0.98);
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-switch {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 16px 8px 8px;
    margin-top: 16px;
    letter-spacing: 0.1px;
    outline: none;
    font-family: inherit;
    transition: color 0.2s;
    width: 100%;
    text-align: center;
}

.auth-switch:hover {
    color: #0046ad;
}

@media (max-width: 420px) {
    .app-header { padding: 10px 12px 6px; min-height: 48px; }
    .header-center { padding: 0 34px; }
    .header-center .logo { font-size: 17px; }
    .header-center .sub-logo { font-size: 8.5px; letter-spacing: 1px; }
    .menu-btn { left: 8px; width: 32px; height: 32px; padding: 4px; }
    .menu-btn svg { width: 20px; height: 20px; }
    .notification-btn { right: 8px; width: 32px; height: 32px; padding: 4px; }
    .notification-btn svg { width: 20px; height: 20px; }
    .circle-btn-wrapper { width: 120px; height: 120px; margin: 4px 0 16px; }
    .circle-btn { width: 120px; height: 120px; font-size: 16px; }
    .ripple-effect { width: 120px; height: 120px; }
    @keyframes rippleAnimation { 0% { width: 120px; height: 120px; } 100% { width: 220px; height: 220px; } }
    .speed-number { font-size: 42px; }
    .google-loader { gap: 8px; height: 34px; margin: 14px 0 8px; }
    .google-loader .loader-dot { width: 10px; height: 10px; }
    @keyframes googleBounce {
        0%, 80%, 100% { transform: translateY(0) scale(1); opacity: 0.7; }
        40% { transform: translateY(-8px) scale(1.15); opacity: 1; }
    }
    .stat-circle .icon-circle { width: 38px; height: 38px; }
    .stat-circle .icon-circle svg { width: 17px; height: 17px; }
    .bottom-stats { padding: 0 2px; }
    .results-stats { gap: 6px; }
    .restart-btn { padding: 8px 14px; font-size: 12px; }
    .screen { padding: 8px 12px 12px; }
    .stars .star { width: 28px; height: 28px; }
    .stars { gap: 6px; }
    .history-title { font-size: 19px; }
    .history-clear-btn { width: 34px; height: 34px; }
    .history-clear-btn svg { width: 16px; height: 16px; }
    .history-expiry-info { font-size: 11.5px; margin-bottom: 12px; }
    .history-day-separator span { font-size: 10px; padding: 4px 12px; }
    .history-item { padding: 12px 14px; border-radius: 12px; }
    .history-item-time { font-size: 12px; }
    .history-speed-value { font-size: 11px; }
    .history-speed-block { padding: 3px 7px; gap: 3px; }
    .history-speed-block svg { width: 11px; height: 11px; }
    .history-item-bottom { gap: 10px; }
    .history-meta { font-size: 10px; }
    .history-meta svg { width: 11px; height: 11px; }
    #screen-history { padding: 12px 12px 6px; }
    #screen-top { padding: 12px 12px 6px; }
    .top-title { font-size: 19px; }
    .top-tab { padding: 9px 10px; font-size: 12px; }
    .top-info { font-size: 11.5px; }
    .top-item { padding: 12px 14px; border-radius: 12px; gap: 10px; }
    .top-rank { width: 30px; height: 30px; border-radius: 9px; }
    .top-rank-number { font-size: 12px; }
    .top-logo-wrap { width: 40px; height: 40px; }
    .top-logo { padding: 0; }
    .top-logo-fallback { font-size: 12px; }
    .top-name { font-size: 13px; }
    .top-meta { font-size: 10px; gap: 6px; }
    .top-meta-item svg { width: 10px; height: 10px; }
    .top-average { font-size: 15px; }
    .top-stars-mini svg { width: 8px; height: 8px; }
    .config-panel { max-width: 100%; padding: 4px 0; }
    #screen-config { padding: 12px 14px 16px; }
    .config-title { font-size: 19px; }
    .config-item { padding: 14px 0; min-height: 52px; }
    .config-label { font-size: 14px; }
    .toggle-switch { width: 44px; height: 26px; }
    .toggle-slider::before { height: 18px; width: 18px; left: 4px; bottom: 4px; }
    .toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }
    .config-info { font-size: 12px; }
    .config-about { padding: 16px 14px; }
    .about-description { font-size: 12px; }
    #screen-admin { padding: 12px 12px 6px; }
    .admin-title { font-size: 16px; }
    .admin-tab { padding: 9px 10px; font-size: 12px; }
    .admin-user-item { padding: 10px 12px; border-radius: 12px; gap: 10px; }
    .admin-user-avatar-wrap { width: 40px; height: 40px; }
    .admin-user-avatar { width: 40px; height: 40px; }
    .admin-user-avatar-fallback { width: 40px; height: 40px; font-size: 13px; }
    .verified-check { width: 22px; height: 22px; right: -5px; bottom: -5px; }
    .admin-user-name { font-size: 13px; max-width: 120px; }
    .admin-user-email { font-size: 11px; }
    .admin-user-date { font-size: 10px; }
    .admin-role-badge { font-size: 8.5px; padding: 2px 5px; }
    .admin-chat-avatar { width: 40px; height: 40px; font-size: 13px; }
    .admin-chat-name { font-size: 13px; }
    .admin-chat-email { font-size: 11px; }
    .admin-chat-preview { font-size: 11px; }
    .admin-search-input { padding: 10px 12px 10px 38px; font-size: 13px; }
    .support-message { max-width: calc(84% - 32px); padding: 8px 12px; border-radius: 14px; }
    .support-message-avatar { width: 24px; height: 24px; }
    .support-avatar-fallback { font-size: 10px; }
    .support-message-text { font-size: 13px; }
    .support-message-time { font-size: 9.5px; }
    .support-header { padding: 8px 10px; min-height: 50px; }
    .support-title { font-size: 14px; }
    .support-subtitle { font-size: 11px; }
    .support-input-form { padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0)); gap: 6px; }
    .support-input { padding: 9px 14px; font-size: 13px; }
    .support-send-btn { width: 36px; height: 36px; }
    .support-send-btn svg { width: 16px; height: 16px; }
    .toast-notification { font-size: 12px; padding: 10px 16px; width: 92%; top: -70px; }
    .toast-notification.show { top: 12px; }
    .modal-card { padding: 24px 20px 20px; border-radius: 18px; }
    .modal-card-confirm { max-width: 100%; padding: 22px 20px 18px; }
    .modal-card-confirm .modal-title { font-size: 16px; }
    .modal-card-user-actions { padding: 18px 16px 12px; border-radius: 16px; }
    .modal-card-user-actions .modal-title { font-size: 15px; }
    .user-action-item { padding: 11px 10px; font-size: 13px; }
    .user-action-item svg { width: 18px; height: 18px; }
    .modal-title { font-size: 16px; }
    .modal-body p { font-size: 13px; }
    .modal-actions { gap: 8px; margin-top: 18px; }
    .modal-btn { padding: 9px 16px; font-size: 12px; min-width: 80px; height: 40px; }
    .splash-logo { width: 96px; height: 96px; border-radius: 22px; }
    .splash-from { font-size: 10px; letter-spacing: 2.5px; }
    .splash-company { font-size: 16px; }
    .splash-content { padding: 32px 20px 60px; }
    .nav-item { font-size: 9px; }
    .nav-item svg { width: 20px; height: 20px; }
    .rating-status { font-size: 10px; }
    .side-menu { width: 86%; }
    .side-menu-inner { padding: 20px 16px 16px; }
    .side-menu-title { font-size: 15.5px; }
    .side-menu-subtitle { font-size: 12px; }
    .auth-btn { padding: 11px 16px; font-size: 13px; min-height: 46px; }
    .auth-btn svg { width: 18px; height: 18px; }
    .user-avatar { width: 64px; height: 64px; }
    .user-name { font-size: 15px; }
    .user-email { font-size: 12px; }
    .side-menu-item { padding: 11px 12px; font-size: 13px; }
    .side-menu-item svg { width: 18px; height: 18px; }
    .user-id-item .user-id-copy-icon { width: 14px; height: 14px; }
    .auth-screen-header { padding: 8px 12px 6px; min-height: 48px; }
    .auth-back-btn { width: 36px; height: 36px; padding: 6px; }
    .auth-back-btn svg { width: 22px; height: 22px; }
    .auth-screen-content { padding: 12px 20px 32px; }
    .auth-screen-brand { margin-bottom: 24px; }
    .auth-screen-title { font-size: 24px; }
    .auth-screen-subtitle { font-size: 13px; }
    .auth-form { gap: 16px; }
    .auth-input-label { font-size: 12.5px; }
    .auth-input { padding: 13px 14px; font-size: 14.5px; }
    .auth-error { font-size: 12px; }
    .auth-submit { padding: 14px 20px; font-size: 14.5px; min-height: 50px; }
    .auth-switch { font-size: 13px; padding: 14px 8px 4px; }
}

@media (min-width: 640px) and (max-width: 767px) {
    body {
        padding: 24px;
        background: var(--page-bg);
    }
    .app-container {
        max-width: 520px;
        height: auto;
        min-height: 720px;
        max-height: calc(100vh - 48px);
        border-radius: 28px;
        box-shadow: 0 24px 70px var(--shadow-color);
        border: 1px solid var(--border-color);
        padding-top: 12px;
    }
    .screen { padding: 20px 24px 24px; }
    .header-center { padding: 0 44px; }
    .menu-btn { left: 14px; width: 38px; height: 38px; }
    .menu-btn svg { width: 24px; height: 24px; }
    .notification-btn { right: 14px; width: 38px; height: 38px; }
    .notification-btn svg { width: 24px; height: 24px; }
    .circle-btn-wrapper { width: 170px; height: 170px; margin: 12px 0 26px; }
    .circle-btn { width: 170px; height: 170px; font-size: 22px; }
    .ripple-effect { width: 170px; height: 170px; }
    @keyframes rippleAnimation { 0% { width: 170px; height: 170px; } 100% { width: 320px; height: 320px; } }
    .speed-number { font-size: 64px; }
    .google-loader { gap: 12px; height: 44px; }
    .google-loader .loader-dot { width: 14px; height: 14px; }
    .stars .star { width: 34px; height: 34px; }
    .config-panel { max-width: 100%; }
    .config-title { font-size: 24px; }
    .config-label { font-size: 15px; }
    .splash-logo { width: 140px; height: 140px; border-radius: 30px; }
    .splash-company { font-size: 20px; }
    .splash-from { font-size: 12px; letter-spacing: 3.5px; }
    .history-title { font-size: 24px; }
    .history-panel { max-width: 440px; }
    .top-title { font-size: 24px; }
    .top-panel { max-width: 440px; }
    .admin-panel { max-width: 440px; }
    .side-menu { max-width: 380px; }
    .side-menu-inner { padding: 28px 24px 24px; }
    .side-menu-title { font-size: 18px; }
    .user-avatar { width: 80px; height: 80px; }
    .user-name { font-size: 17px; }
    .auth-screen-content { max-width: 480px; padding: 24px 32px 48px; }
    .auth-screen-title { font-size: 30px; }
    .auth-screen-subtitle { font-size: 15px; }
}

@media (min-width: 768px) {
    body {
        display: block;
        padding: 0;
        margin: 0;
        width: 100%;
        height: 100%;
        background:
            radial-gradient(circle at 15% 20%, var(--accent-soft) 0%, transparent 45%),
            radial-gradient(circle at 85% 80%, rgba(25, 156, 229, 0.08) 0%, transparent 45%),
            var(--page-bg);
        background-attachment: fixed;
    }

    .app-container {
        max-width: 100%;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
        box-shadow: none;
        border: none;
        margin: 0;
        display: flex;
        flex-direction: column;
        padding: 0;
        overflow: hidden;
        position: relative;
        padding-top: 0;
        padding-bottom: 0;
    }

    .app-header {
        padding: 0 24px;
        min-height: 68px;
        border-bottom: 1px solid var(--border-color);
        justify-content: center;
        align-items: center;
        position: relative;
        background: var(--bg-app);
        z-index: 10;
    }

    .header-center {
        flex: 1;
        text-align: center;
        padding: 0 60px;
    }

    .header-center .logo {
        font-size: 22px;
        font-weight: 700;
        letter-spacing: -0.4px;
    }

    .header-center .sub-logo {
        font-size: 11px;
        letter-spacing: 1.5px;
        margin-top: 2px;
    }

    .menu-btn {
        display: flex;
        left: 24px;
        width: 40px;
        height: 40px;
    }

    .notification-btn {
        right: 24px;
        width: 42px;
        height: 42px;
    }

    .notification-btn svg {
        width: 24px;
        height: 24px;
    }

    .views-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        position: relative;
        padding: 0 100px;
        background: var(--bg-app);
        min-height: 0;
    }

    .screen {
        padding: 24px;
        justify-content: center;
        align-items: center;
        min-height: 0;
        height: 100%;
        overflow: hidden;
        margin: 0 auto;
        width: 100%;
    }

    #screen-home,
    #screen-progress {
        justify-content: center;
        align-items: center;
        margin: 0 auto;
        width: 100%;
    }

    .circle-btn-wrapper {
        width: 170px;
        height: 170px;
        margin: 12px 0 24px;
    }

    .circle-btn {
        width: 170px;
        height: 170px;
        font-size: 20px;
    }

    .circle-btn .inner-text {
        letter-spacing: 3px;
    }

    .ripple-effect {
        width: 170px;
        height: 170px;
    }

    @keyframes rippleAnimation {
        0% { width: 170px; height: 170px; opacity: 0.8; border-color: var(--ripple-color); }
        100% { width: 320px; height: 320px; opacity: 0; border-color: transparent; }
    }

    .bottom-stats {
        max-width: 480px;
        gap: 50px;
        margin-top: 12px;
    }

    .stat-circle .icon-circle {
        width: 48px;
        height: 48px;
    }

    .stat-circle .icon-circle svg {
        width: 22px;
        height: 22px;
    }

    .stat-circle .label {
        font-size: 10.5px;
    }

    .stat-circle .value {
        font-size: 12.5px;
    }

    #screen-progress .speed-number {
        font-size: 84px;
        letter-spacing: -2.5px;
    }

    .speed-unit {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .google-loader {
        gap: 12px;
        height: 44px;
        margin: 24px 0 16px;
    }

    .google-loader .loader-dot {
        width: 14px;
        height: 14px;
    }

    @keyframes googleBounce {
        0%, 80%, 100% { transform: translateY(0) scale(1); opacity: 0.7; }
        40% { transform: translateY(-12px) scale(1.2); opacity: 1; }
    }

    .status-text {
        font-size: 14px;
    }

    #screen-results {
        justify-content: center;
        align-items: center;
        padding: 20px 40px;
        margin: 0 auto;
        width: 100%;
        max-width: 900px;
    }

    #screen-results .speed-display {
        margin-bottom: 10px;
    }

    #screen-results .speed-number {
        font-size: 68px;
        letter-spacing: -2px;
    }

    .results-stats {
        max-width: 640px;
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        margin: 14px 0 10px;
        width: 100%;
    }

    #screen-results .stat-circle {
        padding: 12px 6px;
    }

    #screen-results .stat-circle .icon-circle {
        width: 46px;
        height: 46px;
    }

    #screen-results .stat-circle .icon-circle svg {
        width: 22px;
        height: 22px;
    }

    .rating-section {
        max-width: 500px;
        margin: 10px 0 8px;
        width: 100%;
    }

    .rating-section .rating-label {
        font-size: 12.5px;
        margin-bottom: 8px;
    }

    .stars {
        gap: 10px;
    }

    .stars .star {
        width: 36px;
        height: 36px;
    }

    .restart-btn {
        max-width: 340px;
        padding: 11px 24px;
        font-size: 13.5px;
        margin-top: 10px;
    }

    #screen-history {
        justify-content: flex-start;
        padding: 24px 24px 32px;
        overflow: hidden;
        align-items: center;
        margin: 0 auto;
        width: 100%;
    }

    .history-panel {
        max-width: 1000px;
        width: 100%;
        height: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        margin: 0 auto;
    }

    .history-header {
        max-width: 100%;
        margin-bottom: 14px;
        padding: 0;
    }

    .history-title {
        font-size: 26px;
        letter-spacing: -0.4px;
    }

    .history-clear-btn {
        width: 42px;
        height: 42px;
        right: 0;
    }

    .history-clear-btn svg {
        width: 19px;
        height: 19px;
    }

    .history-expiry-info {
        font-size: 13px;
        margin-bottom: 20px;
        padding: 0;
    }

    .history-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        padding: 0 0 16px;
        overflow-y: auto;
        max-width: 100%;
        flex: 1;
        min-height: 0;
        align-content: start;
    }

    .history-day-separator {
        grid-column: 1 / -1;
        margin: 12px 0 8px;
    }

    .history-day-separator:first-child {
        margin-top: 0;
    }

    .history-day-separator span {
        font-size: 12px;
        padding: 5px 16px;
    }

    .history-item {
        padding: 16px 18px;
        border-radius: 14px;
        gap: 12px;
    }

    .history-item-time {
        font-size: 14px;
    }

    .history-speed-block {
        padding: 5px 10px;
        gap: 5px;
    }

    .history-speed-block svg {
        width: 13px;
        height: 13px;
    }

    .history-speed-value {
        font-size: 13px;
    }

    .history-item-bottom {
        gap: 14px;
        padding-top: 10px;
    }

    .history-meta {
        font-size: 12px;
        gap: 5px;
    }

    .history-meta svg {
        width: 13px;
        height: 13px;
    }

    .history-empty {
        padding: 60px 40px;
        max-width: 480px;
        margin: 0 auto;
        flex: 1;
        min-height: 0;
    }

    .history-empty-icon {
        width: 72px;
        height: 72px;
        margin-bottom: 20px;
    }

    .history-empty-title {
        font-size: 17px;
        margin-bottom: 8px;
    }

    .history-empty-text {
        font-size: 14px;
        max-width: 100%;
    }

    #screen-top {
        justify-content: flex-start;
        padding: 24px 24px 32px;
        overflow: hidden;
        align-items: center;
        margin: 0 auto;
        width: 100%;
    }

    .top-panel {
        max-width: 1000px;
        width: 100%;
        height: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        margin: 0 auto;
    }

    .top-header {
        max-width: 100%;
        margin-bottom: 16px;
        padding: 0;
    }

    .top-title {
        font-size: 26px;
        letter-spacing: -0.4px;
    }

    .top-tabs {
        max-width: 480px;
        margin: 0 auto 16px;
    }

    .top-tab {
        font-size: 14px;
        padding: 12px 16px;
    }

    .top-info {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .top-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        padding: 0 0 16px;
        max-width: 100%;
        align-content: start;
    }

    .top-item {
        padding: 16px 18px;
        border-radius: 14px;
        gap: 14px;
    }

    .top-rank {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    .top-rank-number {
        font-size: 14px;
    }

    .top-logo-wrap {
        width: 48px;
        height: 48px;
    }

    .top-logo {
        padding: 0;
    }

    .top-logo-fallback {
        font-size: 14px;
    }

    .top-name {
        font-size: 15px;
    }

    .top-meta {
        font-size: 12px;
        gap: 10px;
    }

    .top-meta-item svg {
        width: 12px;
        height: 12px;
    }

    .top-average {
        font-size: 18px;
    }

    .top-stars-mini svg {
        width: 10px;
        height: 10px;
    }

    .top-empty {
        padding: 60px 40px;
        max-width: 480px;
        margin: 0 auto;
        flex: 1;
        min-height: 0;
    }

    .top-empty-icon {
        width: 72px;
        height: 72px;
        margin-bottom: 20px;
    }

    .top-empty-title {
        font-size: 17px;
        margin-bottom: 8px;
    }

    .top-empty-text {
        font-size: 14px;
        max-width: 100%;
    }

    #screen-config {
        justify-content: flex-start;
        padding: 24px 24px 32px;
        overflow: hidden;
        align-items: center;
        margin: 0 auto;
        width: 100%;
    }

    .config-panel {
        max-width: 600px;
        padding: 0;
        height: 100%;
        overflow-y: auto;
        margin: 0 auto;
    }

    .config-header {
        margin-bottom: 20px;
    }

    .config-title {
        font-size: 26px;
        letter-spacing: -0.4px;
    }

    .config-item {
        padding: 16px 0;
        min-height: 60px;
    }

    .config-label {
        font-size: 15px;
    }

    .toggle-switch {
        width: 52px;
        height: 30px;
    }

    .toggle-slider::before {
        height: 22px;
        width: 22px;
        left: 4px;
        bottom: 4px;
    }

    .toggle-switch input:checked + .toggle-slider::before {
        transform: translateX(22px);
    }

    .config-about {
        margin-top: 24px;
        padding: 22px 20px;
        border-radius: 18px;
    }

    .about-company {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .about-description {
        font-size: 13.5px;
        line-height: 1.6;
        margin-bottom: 16px;
    }

    .about-btn {
        padding: 12px 22px;
        font-size: 13.5px;
        min-height: 48px;
    }

    .about-btn svg {
        width: 17px;
        height: 17px;
    }

    .config-info {
        margin-top: 24px;
        padding-top: 20px;
        font-size: 13.5px;
    }

    .config-credit {
        font-size: 11.5px;
    }

    #screen-admin {
        justify-content: flex-start;
        padding: 24px 24px 32px;
        overflow: hidden;
        align-items: center;
        margin: 0 auto;
        width: 100%;
    }

    .admin-panel {
        max-width: 1000px;
        width: 100%;
        height: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        margin: 0 auto;
    }

    .admin-header {
        margin-bottom: 16px;
        padding: 0;
    }

    .admin-title {
        font-size: 20px;
    }

    .admin-tabs {
        max-width: 480px;
        margin: 0 auto 16px;
    }

    .admin-tab {
        font-size: 14px;
        padding: 12px 16px;
    }

    .admin-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 0 16px;
        max-width: 100%;
        align-content: start;
    }

    .admin-user-item {
        padding: 14px 16px;
        gap: 14px;
    }

    .admin-user-avatar-wrap {
        width: 48px;
        height: 48px;
    }

    .admin-user-avatar {
        width: 48px;
        height: 48px;
    }

    .admin-user-avatar-fallback {
        width: 48px;
        height: 48px;
        font-size: 15px;
    }

    .verified-check {
        width: 28px;
        height: 28px;
        right: -6px;
        bottom: -6px;
    }

    .admin-user-name {
        font-size: 15px;
        max-width: 200px;
    }

    .admin-user-email {
        font-size: 12px;
    }

    .admin-user-date {
        font-size: 11px;
    }

    .admin-chat-avatar {
        width: 48px;
        height: 48px;
        font-size: 15px;
    }

    .admin-chat-name {
        font-size: 15px;
    }

    .admin-chat-email {
        font-size: 12px;
    }

    .admin-chat-preview {
        font-size: 12.5px;
    }

    .admin-search-input {
        padding: 13px 16px 13px 44px;
        font-size: 14.5px;
    }

    .admin-search-icon {
        left: 16px;
        width: 19px;
        height: 19px;
    }

    #screen-support {
        padding: 0;
        align-items: stretch;
    }

    .support-panel {
        max-width: 1000px;
        width: 100%;
        margin: 0 auto;
    }

    .support-header {
        padding: 12px 20px;
        min-height: 64px;
    }

    .support-title {
        font-size: 16px;
    }

    .support-subtitle {
        font-size: 12px;
    }

    .support-messages {
        padding: 18px 20px;
        gap: 6px;
    }

    .support-message {
        max-width: calc(70% - 40px);
        padding: 11px 16px;
        border-radius: 18px;
    }

    .support-message-avatar {
        width: 32px;
        height: 32px;
    }

    .support-avatar-fallback {
        font-size: 12px;
    }

    .support-message-text {
        font-size: 14.5px;
    }

    .support-message-time {
        font-size: 10.5px;
    }

    .support-input-form {
        padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0));
        gap: 10px;
    }

    .support-input {
        padding: 12px 18px;
        font-size: 14.5px;
    }

    .support-send-btn {
        width: 42px;
        height: 42px;
    }

    .support-send-btn svg {
        width: 20px;
        height: 20px;
    }

    .bottom-nav {
        display: none;
    }

    .side-menu-overlay {
        display: block !important;
    }

    .side-menu {
        position: fixed;
        top: 0;
        left: -380px;
        right: auto;
        width: 380px;
        max-width: 380px;
        height: 100vh;
        height: 100dvh;
        background: var(--side-menu-bg);
        box-shadow: 8px 0 40px rgba(0, 0, 0, 0.15);
        transform: none;
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10002;
        padding-top: env(safe-area-inset-top, 8px);
        padding-bottom: env(safe-area-inset-bottom, 8px);
        border-right: 1px solid var(--border-color);
    }

    .side-menu.active {
        left: 0;
        transform: none;
    }

    .side-menu-inner {
        padding: 28px 24px 24px;
        height: 100%;
        display: flex;
        flex-direction: column;
        gap: 0;
        overflow-y: auto;
    }

    .side-menu-guest,
    .side-menu-user {
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .side-menu-brand {
        text-align: center;
        padding: 8px 0 24px;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 20px;
    }

    .side-menu-title {
        font-size: 18px;
        font-weight: 600;
        text-align: center;
        margin-bottom: 6px;
    }

    .side-menu-subtitle {
        font-size: 13px;
        text-align: center;
        margin: 0 auto;
        max-width: 260px;
        line-height: 1.5;
    }

    .side-menu-auth {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .auth-btn {
        justify-content: center;
        padding: 13px 20px;
        font-size: 14px;
        min-height: 50px;
        border-radius: 30px;
        white-space: nowrap;
        gap: 10px;
    }

    .auth-btn svg {
        width: 20px;
        height: 20px;
    }

    .side-menu-profile {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 12px 0 24px;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 20px;
    }

    .side-menu-profile .user-avatar {
        width: 80px;
        height: 80px;
        margin-bottom: 12px;
    }

    .side-menu-profile .user-name {
        font-size: 17px;
        text-align: center;
        margin-bottom: 4px;
        max-width: 100%;
    }

    .side-menu-profile .user-email {
        font-size: 13px;
        text-align: center;
        max-width: 100%;
    }

    .side-menu-nav {
        position: fixed;
        top: 88px;
        left: 16px;
        display: flex;
        flex-direction: column;
        gap: 4px;
        background: var(--bg-app);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 6px;
        box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
        z-index: 50;
        transition: opacity 0.2s ease;
    }

    .side-menu.active .side-menu-nav {
        opacity: 0;
        pointer-events: none;
    }

    .side-menu-nav-item {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        background: none;
        border: none;
        border-radius: 12px;
        color: var(--text-secondary);
        cursor: pointer;
        transition: background 0.2s, color 0.2s, transform 0.1s;
        outline: none;
        padding: 0;
        flex-shrink: 0;
    }

    .side-menu-nav-item:hover {
        background: var(--card-bg);
        color: var(--text-primary);
    }

    .side-menu-nav-item:active {
        transform: scale(0.92);
    }

    .side-menu-nav-item svg {
        width: 22px;
        height: 22px;
        stroke: currentColor;
        stroke-width: 1.8;
        transition: stroke 0.2s ease;
    }

    .side-menu-nav-item span {
        display: none;
    }

    .side-menu-nav-item.active {
        background: var(--accent-soft);
        color: var(--accent);
    }

    .side-menu-nav-item.active svg {
        stroke: var(--accent);
    }

    .side-menu-nav-item-disabled,
    .side-menu-nav-item:disabled {
        opacity: 0.32;
        cursor: not-allowed;
        pointer-events: none;
    }

    .side-menu-footer {
        margin-top: auto;
        padding-top: 16px;
        border-top: 1px solid var(--border-color);
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .side-menu-item {
        padding: 12px 14px;
        font-size: 14px;
        border-radius: 12px;
        gap: 12px;
        display: flex;
    }

    .side-menu-item svg {
        width: 20px;
        height: 20px;
    }

    .user-id-item {
        padding-right: 12px;
    }

    .auth-screen-content {
        max-width: 500px;
        padding: 32px 40px 48px;
    }

    .auth-screen-header {
        padding: 16px 24px 12px;
        min-height: 60px;
    }

    .auth-back-btn {
        width: 42px;
        height: 42px;
    }

    .auth-back-btn svg {
        width: 24px;
        height: 24px;
    }

    .auth-screen-title {
        font-size: 30px;
    }

    .auth-screen-subtitle {
        font-size: 14.5px;
    }

    .auth-form {
        gap: 18px;
    }

    .auth-input-label {
        font-size: 13.5px;
    }

    .auth-input {
        padding: 15px 18px;
        font-size: 15px;
        border-radius: 13px;
    }

    .auth-error {
        font-size: 13px;
    }

    .auth-submit {
        padding: 16px 26px;
        font-size: 15px;
        min-height: 54px;
        margin-top: 6px;
    }

     .auth-switch {
        font-size: 14px;
        margin-top: 16px;
    }

    .modal-card {
        max-width: 460px;
        padding: 32px 28px 28px;
        border-radius: 22px;
    }

    .modal-card-confirm {
        max-width: 400px;
        padding: 28px 28px 24px;
    }

    .modal-card-user-actions {
        max-width: 400px;
        padding: 24px 24px 20px;
    }

    .modal-card-user-actions .modal-title {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .user-action-item {
        padding: 14px 14px;
        font-size: 14.5px;
    }

    .user-action-item svg {
        width: 22px;
        height: 22px;
    }

    .modal-title {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .modal-card-confirm .modal-title {
        font-size: 18px;
    }

    .modal-body p {
        font-size: 14.5px;
        line-height: 1.65;
    }

    .modal-close {
        width: 34px;
        height: 34px;
        top: 16px;
        right: 16px;
    }

    .modal-close svg {
        width: 17px;
        height: 17px;
    }

    .modal-actions {
        gap: 10px;
        margin-top: 22px;
    }

    .modal-btn {
        padding: 11px 22px;
        font-size: 13.5px;
        min-width: 100px;
        height: 44px;
    }

    .toast-notification {
        max-width: 460px;
        padding: 15px 22px;
        font-size: 14.5px;
        top: -100px;
    }

    .toast-notification.show {
        top: 28px;
    }
}

@media (min-width: 768px) and (max-height: 700px) {
    .app-header {
        min-height: 60px;
        padding: 0 20px;
    }

    .header-center .logo {
        font-size: 20px;
    }

    .header-center .sub-logo {
        font-size: 10px;
    }

    .notification-btn {
        width: 38px;
        height: 38px;
    }

    .notification-btn svg {
        width: 22px;
        height: 22px;
    }

    .side-menu-nav {
        top: 78px;
        left: 14px;
    }

    .side-menu-nav-item {
        width: 44px;
        height: 44px;
    }

    .side-menu-nav-item svg {
        width: 20px;
        height: 20px;
    }

    .views-container {
        padding: 0 90px;
    }

    .circle-btn-wrapper {
        width: 140px;
        height: 140px;
        margin: 8px 0 20px;
    }

    .circle-btn {
        width: 140px;
        height: 140px;
        font-size: 18px;
    }

    .ripple-effect {
        width: 140px;
        height: 140px;
    }

    @keyframes rippleAnimation {
        0% { width: 140px; height: 140px; opacity: 0.8; border-color: var(--ripple-color); }
        100% { width: 260px; height: 260px; opacity: 0; border-color: transparent; }
    }

    #screen-progress .speed-number {
        font-size: 68px;
    }

    #screen-results .speed-number {
        font-size: 56px;
    }

    .google-loader {
        height: 38px;
        margin: 18px 0 12px;
    }

    .google-loader .loader-dot {
        width: 12px;
        height: 12px;
    }

    #screen-history,
    #screen-config,
    #screen-top,
    #screen-admin {
        padding: 20px 24px 24px;
    }

    .history-title,
    .config-title,
    .top-title {
        font-size: 22px;
    }

    .history-day-separator {
        margin: 10px 0 6px;
    }

    .history-item {
        padding: 14px 16px;
    }

    .top-item {
        padding: 14px 16px;
    }

    .config-item {
        padding: 14px 0;
        min-height: 54px;
    }

    .admin-user-item {
        padding: 10px 12px;
    }
}

@media (min-width: 1200px) {
    .views-container {
        padding: 0 140px;
    }

    .history-panel {
        max-width: 1100px;
    }

    .top-panel {
        max-width: 1100px;
    }

    .admin-panel {
        max-width: 1100px;
    }

    .config-panel {
        max-width: 680px;
    }

    .history-list,
    .top-list,
    .admin-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}
