.video-wrapper {
    position: relative;
    overflow: hidden;
    background-color: var(--bg-main);
}

.back-to-home-btn {
    position: absolute;
    top: 5px;
    left: 5px;
    color: black;
    z-index: 1000;
    border-radius: 50%;
    background: #eee;
    width: 30px;
    opacity: 0.9;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
}

.recording .back-to-home-btn {
    display: none !important;
}

#video {
    width: 100%;
    height: 100dvh;
    display: block;
    touch-action: none;
}

.mirror {
    transform: scaleX(-1);
}

#zoom-level {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.camera-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.shutter-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-display {
    color: white;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
    font-family: monospace;
    font-size: 1.2rem;
    visibility: hidden;
    /* Hidden until recording starts */
}

.shutter-container {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-ring {
    position: absolute;
    transform: rotate(-90deg);
    /* Start from the top */
    pointer-events: none;
}

.progress-ring__circle {
    /* Smooth transition for the offset */
    transition: stroke-dashoffset 0.05s linear;
    stroke: #ffcc00;
    /* Your requested gold color */
    stroke-linecap: round;
}

.shutter-button {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    /* Stays a circle */
    border: none;
    z-index: 2;
    transition: transform 0.2s ease;
}

.shutter-button i {
    color: white;
}

/* Optional: Slight pulse when recording */
.recording .shutter-button {
    transform: scale(0.85);
}

/* Red inner circle state for Video Mode */
.mode-video-active .shutter-button {
    background: #ff3b30;
    transform: scale(0.9);
}

/* Purple inner circle state for Audio Mode */
.mode-audio-active .shutter-button {
    background: #af52de;
    transform: scale(0.9);
}

/* Audio overlay shown when audio mode is active */
.audio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    gap: 12px;
}

.audio-overlay i {
    font-size: 80px;
    color: #af52de;
}

.audio-overlay .audio-hint {
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.recording .audio-overlay .audio-hint {
    opacity: 0;
}

/* Audio equalizer shown while recording */
.audio-overlay .equalizer {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 40px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recording .audio-overlay .equalizer {
    opacity: 1;
}

.equalizer .bar {
    width: 6px;
    height: 8px;
    background: #af52de;
    border-radius: 3px;
    transition: height 0.05s linear;
}

/* Hide camera preview when audio mode is active */
.mode-audio-active #video {
    opacity: 0;
}

/* Pulse animation for microphone while recording */
.recording .audio-overlay i {
    animation: micPulse 1s infinite;
}

@keyframes micPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.bottom-ui-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 90%;
}

.mode-switcher {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 30px;
    width: 180px;
    height: 50px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
}

.mode-track {
    display: flex;
    width: 540px;
    transition: transform 0.3s ease;
    will-change: transform;
    transform: translateZ(0);
}

.mode-item {
    flex: 0 0 60px;
    width: 60px;
    color: #888;
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    text-align: center;
    line-height: 50px;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0) scale(1);
}

.mode-item.active {
    color: #ffcc00;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

#recording-timer {
    color: white;
    font-size: 13px;
    padding: 2px 10px;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
}

.submit-btn {
    position: absolute;
    right: -70px;
    /* Positions it to the right of the shutter ring */
    background: #4cd964;
    /* Green background */
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.bottom-ui-row {

    min-height: 80px;
}

.bottom-ui-row.hidden {
    opacity: 0;
    pointer-events: none;
}