:root {
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --accent-blue: #4285f4;
    --accent-red: #ea4335;
    --accent-green: #34a853;
    --accent-yellow: #fbbc05;
    --text-main: #202124;
    --text-secondary: #5f6368;
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* Ambient Background blobs */
.blob {
    position: absolute;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--accent-blue);
    border-radius: 40% 60% 70% 30%;
    animation: morph 15s infinite;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--accent-red);
    border-radius: 60% 40% 30% 70%;
    animation: morph 20s infinite reverse;
}

@keyframes morph {
    0% {
        border-radius: 40% 60% 70% 30%;
    }

    50% {
        border-radius: 30% 70% 50% 50%;
    }

    100% {
        border-radius: 40% 60% 70% 30%;
    }
}

header {
    width: 100%;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    z-index: 1000;
}

.brand {
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -1px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 100px;
    width: 100%;
    max-width: 1000px;
}

/* Glassmorphism Cards */
.glass-panel {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(66, 133, 244, 0.1);
    color: var(--accent-blue);
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 20px;
}

.primary-status {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.1;
}

.sub-status {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 40px;
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
}

.stat-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 5px;
}

/* Video Feed with HUD Overlay */
.video-container {
    position: relative;
    width: 640px;
    height: 480px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
    border: 4px solid #fff;
}

video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    /* Mirror effect */
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    transform: scaleX(-1);
    /* Align overlay with mirrored video */
}

.hud-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 20;
    color: rgba(255, 255, 255, 0.8);
    font-family: monospace;
    font-size: 12px;
    pointer-events: none;
}

/* Controls */
.controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
    z-index: 50;
    flex-wrap: wrap;
}

.btn {
    padding: 16px 32px;
    border-radius: 50px;
    border: none;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-start {
    background: var(--text-main);
    color: #fff;
}

.btn-stop {
    background: #fff;
    color: var(--accent-red);
}

/* Roast Modal */
.roast-modal {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(234, 67, 53, 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 24px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(234, 67, 53, 0.3);
    display: flex;
    align-items: center;
    gap: 20px;
    color: white;
    z-index: 2000;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 90%;
    width: max-content;
}

.roast-modal.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.roast-icon {
    font-size: 32px;
    animation: shake 0.5s infinite;
}

.roast-content div:first-child {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    font-weight: 800;
}

.roast-content div:last-child {
    font-size: 20px;
    font-weight: 700;
}

@keyframes shake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

/* Log Panel */
.log-panel {
    width: 100%;
    max-width: 800px;
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 20px;
    font-family: monospace;
    font-size: 12px;
    color: var(--text-secondary);
    height: 150px;
    overflow-y: auto;
}