@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@500;700;800&display=swap');

:root {
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --accent-primary: #0ea5e9; 
    --accent-primary-hover: #0284c7;
    --accent-success: #10b981; 
    --glass-bg: rgba(15, 23, 42, 0.65); 
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.12);
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    
    /* --- YOUR CUSTOM BACKGROUND --- */
    /* Put your image in the folder and change 'my-bg.jpg' to your file's exact name */
    background-image: 
        linear-gradient(to bottom right, rgba(9, 15, 26, 0.85), rgba(15, 23, 42, 0.95)),
        url('my-bg.jpg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 32px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    text-align: center;
    width: 100%;
    max-width: 1000px; /* Widened to fit the side-by-side layout */
}

h1 {
    font-family: 'Outfit', sans-serif;
    margin-top: 0;
    margin-bottom: 30px;
    font-weight: 800;
    font-size: 2.2rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #38bdf8, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* --- THE NEW DESKTOP LAYOUT --- */
.main-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* Video takes 60% of space, Sidebar takes 40% */
    gap: 24px;
    align-items: start;
}

.video-container {
    position: relative;
    margin-bottom: 0; /* Removed bottom margin since it sits side-by-side */
    border-radius: 20px;
    overflow: hidden;
    width: 100%;           
    aspect-ratio: 4 / 3;   
    background-color: #000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-highlight);
}

.output_canvas {
    transform: scaleX(-1);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sidebar Dashboard */
.dashboard {
    display: flex;
    flex-direction: column; /* Stacks the buttons vertically */
    gap: 16px;
    height: 100%;
}

.metric {
    background: rgba(255, 255, 255, 0.03);
    padding: 16px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.metric span {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.2rem;
    text-transform: none;
    letter-spacing: 0;
}

.rep-counter {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.02));
    border: 1px solid rgba(16, 185, 129, 0.2);
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.05);
}

.rep-counter span {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-success);
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.button-toggle {
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    padding: 18px; /* Slightly taller for easier clicking */
}

.button-toggle:active {
    transform: scale(0.95);
}

.btn-arm {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.2);
    border: none;
    margin-top: auto; /* Pushes the buttons to the bottom of the sidebar */
}
.btn-arm:hover {
    box-shadow: 0 15px 25px rgba(14, 165, 233, 0.4);
    transform: translateY(-2px);
}

.btn-sound {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
}
.btn-sound:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}
.btn-sound.muted {
    background: transparent;
    color: var(--text-muted);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

/* --- THE MOBILE LAYOUT --- */
/* When the screen is smaller than 900px (iPhones, iPads, half-screen browser windows) */
@media (max-width: 900px) {
    .container {
        padding: 24px;
        border-radius: 28px;
    }
    
    .main-layout {
        grid-template-columns: 1fr; /* Stacks the video and dashboard underneath each other */
        gap: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .btn-arm {
        margin-top: 0; /* Removes the push-to-bottom effect on mobile */
    }
}