:root {
    --bg-primary: #0a0e12;
    --bg-secondary: #151a21;
    --bg-tertiary: #1e252e;
    --text-primary: #e8edf2;
    --text-secondary: #8b95a1;
    --text-tertiary: #5a6470;
    --accent-primary: #00d9ff;
    --accent-glow: rgba(0, 217, 255, 0.2);
    --accent-heat: #ff6b35;
    --accent-cool: #4ecdc4;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(0, 217, 255, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(255, 107, 53, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    animation: fadeIn 0.8s ease-out;
}

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

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    animation: slideDown 0.6s ease-out;
}

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

.title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.9);
    }
}

.status-indicator.online .status-dot {
    background: var(--accent-primary);
    box-shadow: 0 0 12px var(--accent-glow);
}

.status-indicator.offline .status-dot {
    background: var(--accent-heat);
    animation: none;
}

.status-text {
    color: var(--text-secondary);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    margin-bottom: 40px;
    animation: slideUp 0.8s ease-out 0.2s backwards;
}

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

.thermostat-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 8px 32px var(--shadow);
    position: relative;
    overflow: hidden;
}

.thermostat-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0.3;
}

.temp-display {
    text-align: center;
    margin-bottom: 48px;
}

.current-temp {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.temp-value {
    font-family: 'Syne', sans-serif;
    font-size: clamp(72px, 12vw, 120px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-shadow: 0 0 40px var(--accent-glow);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.temp-value.heating {
    color: var(--accent-heat);
    text-shadow: 0 0 40px rgba(255, 107, 53, 0.3);
}

.temp-value.cooling {
    color: var(--accent-cool);
    text-shadow: 0 0 40px rgba(78, 205, 196, 0.3);
}

.temp-unit {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 400;
    color: var(--text-tertiary);
}

.temp-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-tertiary);
}

.climate-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.detail-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
}

.detail-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
}

.activity-indicator {
    width: 100%;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.activity-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-cool));
    border-radius: 2px;
    transition: width 0.8s ease, background 0.4s ease;
    box-shadow: 0 0 12px var(--accent-glow);
}

.activity-bar.active {
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0%, 100% {
        width: 30%;
        margin-left: 0;
    }
    50% {
        width: 60%;
        margin-left: 40%;
    }
}
.payment-notice {
    margin-top: 24px;
    padding: 16px 24px;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent-heat);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.lightning-icon {
    font-size: 16px;
    animation: zap 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 rgba(255, 107, 53, 0);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.2);
    }
}

@keyframes zap {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.qr-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.qr-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.qr-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 24px rgba(0, 217, 255, 0.1);
    transform: scale(1.02);
}

.qr-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-tertiary);
}

.qr-code {
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    padding: 12px;
}

.qr-code img {
    width: 100% !important;
    height: 100% !important;
}

.footer {
    display: flex;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    animation: fadeIn 1s ease-out 0.4s backwards;
}

.update-time {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
}

#lastUpdate {
    color: var(--text-secondary);
    margin-left: 8px;
}

/* Responsive Design */
@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .qr-section {
        flex-direction: row;
        justify-content: center;
    }

    .thermostat-panel {
        padding: 32px;
    }
}

@media (max-width: 600px) {
    .header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .climate-details {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .qr-section {
        flex-direction: column;
    }

    .thermostat-panel {
        padding: 24px;
    }
}
