* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #6200ee;
    --primary-light: #8f39ff;
    --primary-dark: #3700b3;
    --secondary: #03dac6;
    --secondary-dark: #018786;
    --background: #f8f9fa;
    --surface: #ffffff;
    --error: #b00020;
    --text-primary: #212121;
    --text-secondary: #666666;
}

body {
    background-color: var(--background);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.container {
    width: 100%;
    max-width: 800px;
    min-height: 400px;
    margin: 0 auto;
    padding: 20px;
}

.screen {
    background-color: var(--surface);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin: 20px 0;
    position: relative;
    border-left: 4px solid var(--primary);
}

.hidden {
    display: none;
}

.primary-button {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.primary-button:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.primary-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.video-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.video-box {
    flex: 1;
    min-width: 100%;
    height: 450px;
    background-color: #333;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

/* Make sure videos stay contained */
.video-box video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    max-width: 100%;
}

/* Floating End Call Button */
.control-button.danger {
    background-color: var(--error);
    color: white;
    border-radius: 8px;
    width: auto;
    padding: 8px 15px;
    display: block;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.control-button.danger:hover {
    background-color: #d00030;
    transform: translateY(-2px);
}

/* Interview controls */
.interview-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.control-button {
    background-color: var(--surface);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.control-button:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.question-container {
    background-color: rgba(3, 218, 198, 0.1);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid var(--secondary);
    animation: fadeIn 0.5s ease-in-out;
}

.question-bubble {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    line-height: 1.5;
    position: relative;
}

.bot-icon {
    background-color: var(--primary-light);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.countdown {
    font-size: 16px;
    font-weight: plain;
    color: var(--error);
    margin-top: 10px;
}

.submission-area {
    text-align: center;
    margin-top: 30px;
}

.fade {
    opacity: 0.3;
    transition: opacity 0.5s;
}

/* iOS Overlay Styles */
.ios-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.ios-overlay-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 80%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.ios-overlay-content h3 {
    margin-bottom: 15px;
    color: var(--primary);
    font-weight: 600;
}

.tap-icon {
    font-size: 40px;
    margin: 20px 0;
    animation: pulse 1.5s infinite;
}

/* Progress indicator */
.progress-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
}

.progress-indicator::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #e0e0e0;
    z-index: 0;
}

.progress-bar {
    position: absolute;
    top: 15px;
    left: 0;
    height: 3px;
    background-color: var(--primary);
    z-index: 1;
    transition: width 0.5s ease;
}

.progress-step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: white;
    border: 3px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.step-active {
    border-color: var(--primary);
    background-color: var(--primary);
    color: white;
}

.step-completed {
    border-color: var(--primary);
    background-color: var(--primary);
    color: white;
}

.step-completed::after {
    content: "✓";
    font-size: 1rem;
}

/* Sound wave animation */
.sound-wave {
    display: flex;
    align-items: center;
    height: 20px;
    margin-left: 10px;
}

.wave-bar {
    display: inline-block;
    width: 3px;
    margin: 0 1px;
    background-color: var(--primary);
    animation: sound-wave-animation 1.2s infinite ease-in-out;
}

.wave-bar:nth-child(1) { height: 8px; animation-delay: 0s; }
.wave-bar:nth-child(2) { height: 16px; animation-delay: 0.2s; }
.wave-bar:nth-child(3) { height: 10px; animation-delay: 0.4s; }
.wave-bar:nth-child(4) { height: 14px; animation-delay: 0.6s; }
.wave-bar:nth-child(5) { height: 6px; animation-delay: 0.8s; }

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

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

@keyframes sound-wave-animation {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.5); }
}

/* Status indicators for video/audio */
.status-indicator {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    z-index: 10;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #4CAF50;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

/* Tips card */
.tips-card {
    background-color: rgba(3, 218, 198, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
    border-left: 4px solid var(--secondary);
}

.tips-title {
    font-weight: 600;
    color: var(--secondary-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.tips-icon {
    margin-right: 8px;
}

.tips-list {
    margin: 0;
    padding-left: 25px;
}

.tips-list li {
    margin-bottom: 8px;
    font-size: 0.9rem;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.tips-list li:nth-child(1) { animation-delay: 0.2s; }
.tips-list li:nth-child(2) { animation-delay: 0.4s; }
.tips-list li:nth-child(3) { animation-delay: 0.6s; }

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

/* Button states for feedback */
.control-button.muted {
    background-color: var(--error);
    color: white;
}

/* Media queries for responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        width: 100%;
    }
    
    .screen {
        padding: 15px;
        margin: 10px 0;
        width: 100%;
        max-width: 100%;
    }
    
    .video-box {
        min-width: 100%;
        max-width: 100%;
        height: 350px;
    }
    
    .video-container {
        flex-direction: column;
        padding: 0;
        margin: 0 0 15px 0;
    }
    
    .interview-controls {
        position: absolute;
        bottom: 60px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        justify-content: center;
        gap: 15px;
        z-index: 1001;
    }
    
    .control-button {
        width: 45px;
        height: 45px;
    }
    
    .control-button.danger {
        background-color: var(--error);
        color: white;
        border-radius: 5px;
        width: auto;
        padding: 0 15px;
    }
    
    .question-container {
        padding: 15px;
    }
    
    .countdown {
        font-size: 16px;
    }

#local-media {
  min-height: 400px;
  position: relative;
}

#local-media video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: contain;
}



/* Fix for iOS video sizing */
@supports (-webkit-touch-callout: none) {
    .video-box video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }
}