html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body {
    background: #050505;
    color: #f6f6f6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.page {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 16px;
    box-sizing: border-box;
    background:
        radial-gradient(circle at 18% 8%, rgba(242, 106, 33, 0.22), transparent 28%),
        radial-gradient(circle at 82% 86%, rgba(242, 106, 33, 0.10), transparent 30%),
        linear-gradient(135deg, #020202, #090909 55%, #111111);
}

.kiosk {
    width: 100%;
    max-width: 1360px;
    min-height: calc(100vh - 32px);
    min-height: calc(100dvh - 32px);
    margin: 0 auto;
    padding: 22px;
    box-sizing: border-box;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(18, 18, 18, 0.98), rgba(5, 5, 5, 0.98));
    border: 1px solid rgba(242, 106, 33, 0.20);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.brand-header {
    display: flex;
    align-items: center;
    min-height: 72px;
}

.brand-header-left {
    justify-content: flex-start;
}

.brand-logo {
    display: block;
    max-width: min(330px, 50vw);
    max-height: 84px;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.55));
}

.hero {
    display: flex;
    gap: 22px;
    flex: 1 1 auto;
    min-height: 0;
}

.hero-main {
    flex: 1 1 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 4px 0;
}

.battery-circle {
    width: 100%;
    max-width: 540px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 42%, rgba(242, 106, 33, 0.24), transparent 40%),
        linear-gradient(180deg, #161616, #070707);
    border: 1px solid rgba(242, 106, 33, 0.34);
    box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.45), 0 18px 70px rgba(0, 0, 0, 0.52);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 22px;
    box-sizing: border-box;
}

.battery-label {
    font-size: 18px;
    color: rgba(246, 246, 246, 0.55);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.10em;
}

.battery-percent {
    font-size: 112px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: #ffffff;
    text-shadow: 0 12px 34px rgba(0, 0, 0, 0.50);
    transition: color 0.3s ease;
}

.battery-state {
    margin-top: 12px;
    font-size: 21px;
    color: rgba(242, 106, 33, 0.92);
    min-height: 28px;
    font-weight: 600;
}

.battery-bar {
    width: 100%;
    max-width: 540px;
    height: 18px;
    margin: 0 auto;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.battery-bar-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: #1fd06f;
    transition: width 0.4s ease, background 0.4s ease;
}

.hero-side {
    flex: 1 1 40%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: center;
}

.mini-card {
    flex: 1 1 auto;
    min-height: 102px;
    background: linear-gradient(180deg, rgba(24, 24, 24, 0.96), rgba(14, 14, 14, 0.96));
    border: 1px solid rgba(242, 106, 33, 0.16);
    border-radius: 18px;
    padding: 16px 18px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.mini-label {
    font-size: 14px;
    color: rgba(246, 246, 246, 0.55);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.mini-value {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: #ffffff;
}

.mini-note {
    margin-top: 6px;
    font-size: 14px;
    color: rgba(242, 106, 33, 0.82);
    min-height: 18px;
}

.stats-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1 1 220px;
    min-height: 132px;
    background: linear-gradient(180deg, rgba(24, 24, 24, 0.96), rgba(14, 14, 14, 0.96));
    border: 1px solid rgba(242, 106, 33, 0.16);
    border-radius: 20px;
    padding: 20px;
    box-sizing: border-box;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.stat-primary {
    background: linear-gradient(180deg, rgba(34, 22, 15, 0.98), rgba(14, 14, 14, 0.98));
    border-color: rgba(242, 106, 33, 0.28);
}

.stat-label {
    font-size: 14px;
    color: rgba(246, 246, 246, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    font-weight: 700;
}

.stat-value {
    font-size: 46px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #ffffff;
    word-break: break-word;
}

.stat-note {
    margin-top: 10px;
    font-size: 15px;
    color: rgba(242, 106, 33, 0.82);
    min-height: 20px;
}

.stat-note:empty,
.mini-note:empty,
.bottom-update-api:empty {
    display: none;
}

.bottom-meta {
    margin-top: auto;
    padding-top: 6px;
    text-align: center;
}

.bottom-update-label {
    font-size: 13px;
    color: rgba(246, 246, 246, 0.42);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.bottom-update-time {
    font-size: 24px;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.bottom-update-api {
    margin-top: 4px;
    font-size: 13px;
    color: rgba(246, 246, 246, 0.42);
}

.bottom-source {
    margin-top: 10px;
    font-size: 11px;
    color: rgba(246, 246, 246, 0.28);
    text-align: center;
}

@media (max-width: 1100px) {
    .battery-percent {
        font-size: 86px;
    }

    .mini-value {
        font-size: 30px;
    }

    .stat-value {
        font-size: 36px;
    }

    .brand-logo {
        max-width: min(280px, 54vw);
        max-height: 72px;
    }
}

@media (max-width: 900px) {
    .kiosk {
        padding: 16px;
        gap: 16px;
    }

    .hero {
        flex-direction: column;
    }

    .hero-side {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }

    .mini-card {
        flex: 1 1 220px;
        min-height: 88px;
    }

    .battery-circle {
        max-width: 420px;
    }

    .battery-percent {
        font-size: 78px;
    }
}

@media (max-width: 640px) {
    .page {
        padding: 8px;
    }

    .kiosk {
        min-height: calc(100vh - 16px);
        min-height: calc(100dvh - 16px);
        padding: 12px;
        border-radius: 18px;
        gap: 12px;
    }

    .brand-header {
        min-height: 46px;
    }

    .brand-logo {
        max-width: min(220px, 62vw);
        max-height: 44px;
    }

    .battery-circle {
        max-width: 300px;
        padding: 16px;
    }

    .battery-label {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .battery-percent {
        font-size: 62px;
    }

    .battery-state {
        font-size: 14px;
        margin-top: 10px;
    }

    .battery-bar {
        height: 12px;
        max-width: 300px;
    }

    .hero-side {
        flex-direction: column;
        gap: 8px;
    }

    .mini-card {
        min-height: 62px;
        padding: 10px 12px;
        border-radius: 14px;
    }

    .mini-label {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .mini-value {
        font-size: 21px;
        line-height: 1;
    }

    .mini-note {
        display: none;
    }

    .stat-card {
        min-height: 104px;
        padding: 14px;
        border-radius: 16px;
    }

    .stat-label {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .stat-value {
        font-size: 28px;
    }

    .stat-note {
        font-size: 12px;
        margin-top: 8px;
    }

    .bottom-update-label {
        font-size: 11px;
    }

    .bottom-update-time {
        font-size: 18px;
    }

    .bottom-source {
        font-size: 10px;
    }
}

/* Phone: make battery detail cards much smaller */
@media (max-width: 640px) {
    .hero-side {
        gap: 5px;
    }

    .mini-card {
        min-height: 44px;
        padding: 7px 10px;
        border-radius: 11px;
    }

    .mini-label {
        font-size: 8px;
        margin-bottom: 2px;
        line-height: 1;
        letter-spacing: 0.04em;
    }

    .mini-value {
        font-size: 17px;
        line-height: 1;
    }

    .mini-note {
        display: none;
    }
}

/* Phone: battery detail cards in one compact row */
@media (max-width: 640px) {
    .hero-side {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        width: 100%;
    }

    .mini-card {
        min-height: 48px !important;
        height: 48px !important;
        padding: 6px 6px !important;
        border-radius: 10px !important;
        justify-content: center;
        overflow: hidden;
    }

    .mini-label {
        font-size: 7px !important;
        line-height: 1 !important;
        margin-bottom: 3px !important;
        letter-spacing: 0.02em !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
    }

    .mini-value {
        font-size: 15px !important;
        line-height: 1 !important;
        text-align: center;
        white-space: nowrap;
    }

    .mini-note {
        display: none !important;
    }
}

/* Smaller DF System logo */
.brand-header {
    min-height: 48px;
}

.brand-logo {
    max-width: min(220px, 42vw);
    max-height: 54px;
}

@media (max-width: 640px) {
    .brand-header {
        min-height: 36px;
    }

    .brand-logo {
        max-width: min(160px, 48vw);
        max-height: 34px;
    }
}

/* Update time inside battery circle */
.battery-update-time {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.2;
    color: rgba(246, 246, 246, 0.38);
    font-weight: 500;
}

.bottom-update-label,
.bottom-update-time,
.bottom-update-api {
    display: none !important;
}

@media (max-width: 640px) {
    .battery-update-time {
        margin-top: 6px;
        font-size: 11px;
    }
}
