/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    background-color: #121212;
    min-height: 100vh;
}

/* Navigation Bar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 5px;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: #4CAF50;
}

.nav-links a.active::after {
    background-color: #4CAF50;
    width: 100%;
}

/* Webcam app styles with Montserrat font and modern look */
.App {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.App-header {
    background: linear-gradient(135deg, #1a2a6c, #152238);
    min-height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    font-size: calc(10px + 1vmin);
    color: white;
    padding: 20px;
}

h1 {
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 2.5rem;
    letter-spacing: 1px;
}

h3 {
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 10px;
}

.controls {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.start-button, .stop-button, .record-button, .recording-button, .nav-button, .reset-button, .capture-button, .multi-capture-button {
    border: none;
    color: white;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.start-button {
    background-color: #4CAF50;
}

.start-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

.stop-button {
    background-color: #f44336;
}

.stop-button:hover {
    background-color: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

.record-button {
    background-color: #007bff;
}

.record-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

.recording-button {
    background-color: #dc3545;
    animation: pulse 1.5s infinite;
}

.nav-button {
    background-color: rgba(108, 117, 125, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.nav-button:hover {
    background-color: rgba(90, 98, 104, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

.login-button {
    background-color: #17a2b8;
}

.login-button:hover {
    background-color: #138496;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

.reset-button {
    background-color: #6c5ce7;
}

.reset-button:hover {
    background-color: #5541d8;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

.capture-button, .multi-capture-button {
    color: #212529;
}

.capture-button {
    background-color: #ffc107; /* Yellow */
}

.capture-button:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

.multi-capture-button {
    background-color: #20c997; /* Teal */
}

.multi-capture-button:hover {
    background-color: #15a37f;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Recording indicator */
.recording-indicator {
    color: #dc3545;
    font-weight: bold;
    margin-left: 10px;
    animation: pulse 1.5s infinite;
}

/* Context selector styles */
.context-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.context-dropdown {
    padding: 10px 16px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Fix for dropdown text visibility */
.context-dropdown option {
    background-color: #152238;
    color: white;
    font-family: 'Montserrat', sans-serif;
    padding: 8px;
}

.context-dropdown:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.video-container {
    width: 100%;
    max-width: 1600px;
    padding: 0 10px;
    box-sizing: border-box;
}

.montage-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 20px;
}

.montage-canvas {
    display: block;
    background-color: #000;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 100%;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Style for the capture buttons container */
.capture-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

/* Streaming controls container */
.streaming-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* Multi-resolution capture status overlay */
.capture-status {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    z-index: 1000;
    width: 80%;
    max-width: 400px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.progress-bar {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    height: 10px;
    margin-top: 15px;
    overflow: hidden;
}

.progress {
    background-color: #4CAF50;
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .top-nav {
        flex-direction: column;
        padding: 1rem;
    }
    
    .nav-logo {
        margin-bottom: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-links li {
        margin: 5px 10px;
    }
    
    .controls {
        flex-direction: column;
        gap: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .capture-status {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .nav-links {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-links li {
        margin: 5px 0;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .context-dropdown {
        padding: 8px 12px;
        font-size: 14px;
    }
}