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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

#topBanner {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain; /* Show full image without cropping */
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    display: block;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 600;
}

header p {
    font-size: 1.1em;
    color: #7f8c8d;
}

.privacy-notice {
    font-size: 0.95em !important;
    color: #27ae60 !important;
    font-weight: 500;
    margin-top: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.bookmark-notice {
    text-align: center;
    margin: 20px 0;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.bookmark-notice p {
    color: white !important;
    font-size: 1em;
    margin: 0;
    font-weight: 500;
}

main {
    flex: 1;
    background: white;
    border-radius: 6px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
}

.recording-setup {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.recording-setup #startBtn {
    width: 100%;
    margin-bottom: 20px;
    font-size: 18px;
    padding: 15px 24px;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.download-section {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.download-section.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

.download-section .btn {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Mobile responsiveness for download section */
@media (max-width: 768px) {
    .download-section {
        bottom: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        padding: 12px 15px;
    }
    
    .download-section .btn {
        width: 100%;
        justify-content: center;
        font-size: 15px;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid #d1d9e0;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-width: 160px;
    justify-content: center;
    background: white;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none !important;
}

.btn-primary {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.btn-primary:hover:not(:disabled) {
    background: #34495e;
    border-color: #34495e;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border-color: #95a5a6;
}

.btn-secondary:hover:not(:disabled) {
    background: #7f8c8d;
    border-color: #7f8c8d;
    transform: translateY(-1px);
}

.btn-success {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.btn-success:hover:not(:disabled) {
    background: #2980b9;
    border-color: #2980b9;
    transform: translateY(-1px);
}

.icon {
    font-size: 1.2em;
}

.preview-section {
    margin-bottom: 30px;
    text-align: center;
}

video {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
}

#preview {
    max-height: 400px;
}

#recorded {
    max-height: 500px;
}

.status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e1e5e9;
    border-left: 4px solid #3498db;
}

.status-message {
    font-weight: 500;
    color: #2c3e50;
}

.timer {
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    font-weight: bold;
    color: #3498db;
    background: white;
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid #3498db;
}

.options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 20px;
}

/* Ensure each option group keeps its items together */
.option-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 1 auto; /* Prevent stretching */
}

/* Let the video-quality dropdown shrink gracefully on small screens */
.option-group select {
    min-width: 180px;
}

@media (max-width: 768px) {
    .options {
        gap: 16px;
    }
    .option-group select {
        min-width: 160px;
        width: 100%;
    }
}

.recording-setup .options {
    margin-bottom: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #bdc3c7;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
    background: #3498db;
    border-color: #3498db;
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

select {
    padding: 8px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
    color: #2c3e50;
}

select:focus {
    outline: none;
    border-color: #3498db;
}

footer {
    text-align: center;
    margin-top: 20px;
    color: #7f8c8d;
    font-size: 0.9em;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;
}

.modal[style*="block"] {
    display: flex !important;
}

.modal-content {
    background-color: white;
    margin: 20px; /* Small margin from viewport edges */
    padding: 30px;
    border-radius: 6px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: relative;
    border: 1px solid #e1e5e9;
    animation: modalSlideIn 0.3s ease;
    max-height: calc(100vh - 40px); /* Ensure modal fits in viewport */
    overflow-y: auto; /* Allow scrolling if content is too tall */
}

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

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #95a5a6;
    transition: color 0.2s ease;
}

.close:hover {
    color: #2c3e50;
}

.modal h3 {
    margin-bottom: 15px;
    color: #e74c3c;
    font-weight: 600;
}

/* Progress Modal Styles */
.progress-modal {
    max-width: 500px;
    text-align: center;
}

.progress-modal h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.progress-info {
    margin-bottom: 20px;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.progress-bar {
    flex-grow: 1;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-details {
    margin-top: 15px;
    color: #666;
    font-size: 0.9em;
}

.progress-details p {
    margin: 5px 0;
}

.processing-spinner {
    margin: 20px 0;
}

.spinner {
    border: 4px solid #f0f0f0;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Recording indicator */
.recording {
    animation: pulse 2s infinite;
    background: #e74c3c !important;
    border-color: #c0392b !important;
}

.recording:hover {
    background: #c0392b !important;
    border-color: #a93226 !important;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Video Editing Interface */
.video-editor {
    margin-top: 20px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 20px;
    background: #f8f9fa;
}

.video-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

#videoCanvas {
    max-width: 100%;
    height: auto;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    background: #000;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.crop-rectangle {
    position: absolute;
    border: 2px solid #3498db;
    pointer-events: all;
    cursor: move;
    background: rgba(52, 152, 219, 0.1);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.crop-rectangle:hover {
    border-color: #2980b9;
    background: rgba(41, 128, 185, 0.15);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9), 0 2px 8px rgba(52, 152, 219, 0.3);
}

.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #3498db;
    border: 2px solid #fff;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    opacity: 0.9;
    display: none; /* Hidden by default, positioned by JavaScript */
    z-index: 1000; /* Ensure handles appear above other elements */
}

.crop-handle:hover {
    background: #2980b9;
    transform: scale(1.2);
    opacity: 1;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.crop-handle:active {
    background: #21618c;
    transform: scale(1.3);
}

/* Corner handles - positioning handled by JavaScript */
.crop-handle-nw { 
    cursor: nw-resize; 
}

.crop-handle-ne { 
    cursor: ne-resize; 
}

.crop-handle-sw { 
    cursor: sw-resize; 
}

.crop-handle-se { 
    cursor: se-resize; 
}

/* Edge handles - positioning handled by JavaScript */
.crop-handle-n { 
    cursor: n-resize; 
}

.crop-handle-s { 
    cursor: s-resize; 
}

.crop-handle-e { 
    cursor: e-resize; 
}

.crop-handle-w { 
    cursor: w-resize; 
}

/* Picture-in-Picture Overlay */
.pip-overlay {
    position: absolute;
    border: 2px solid #3498db;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: #000;
    z-index: 500;
    min-width: 80px;
    min-height: 60px;
    cursor: move;
}

.pip-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pip-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #3498db;
    cursor: se-resize;
    border-top-left-radius: 4px;
}

.pip-resize-handle:hover {
    background: #2980b9;
}

/* PiP Controls */
.pip-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pip-shape, .pip-position, .pip-size {
    font-size: 12px;
    padding: 4px 8px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    background: white;
}

.pip-controls label {
    font-weight: 600;
    color: #2c3e50;
}

.pip-zoom-label {
    margin-left: 15px;
    margin-right: 5px;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.pip-zoom {
    margin-right: 8px;
    width: 80px;
    height: 6px;
    border-radius: 3px;
    background: #e1e5e9;
    outline: none;
    -webkit-appearance: none;
}

.pip-zoom::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pip-zoom::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pip-zoom-value {
    font-size: 11px;
    color: #666;
    font-weight: 500;
    min-width: 35px;
    display: inline-block;
}

.export-quality {
    font-size: 12px;
    padding: 4px 8px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    background: white;
    min-width: 160px;
}

.quality-hint {
    font-size: 11px;
    color: #666;
    margin-left: 8px;
    font-style: italic;
}

.timeline-container {
    margin-bottom: 20px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
}

.timeline-label {
    font-weight: 600;
    color: #2c3e50;
}

.timeline-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

#muteBtn {
    font-size: 16px;
    min-width: 32px;
    padding: 4px 8px;
}

#volumeSlider {
    width: 80px;
    height: 4px;
    background: #e1e5e9;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

#volumeSlider::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
}

#volumeSlider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.audio-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #27ae60;
    margin-left: 8px;
    transition: background-color 0.3s ease;
}

.audio-status.warning {
    background: #f39c12;
}

.audio-status.error {
    background: #e74c3c;
}

/* Recording Countdown Overlay */
.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.countdown-content {
    text-align: center;
    color: white;
    animation: countdownPulse 1s ease-in-out infinite;
}

.countdown-text {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 20px;
    opacity: 0.9;
}

.countdown-number {
    font-size: 120px;
    font-weight: 700;
    line-height: 1;
    margin: 20px 0;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    animation: countdownScale 1s ease-in-out;
}

.countdown-subtitle {
    font-size: 18px;
    font-weight: 400;
    margin-top: 20px;
    opacity: 0.8;
}

@keyframes countdownPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

@keyframes countdownScale {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    20% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile responsiveness for countdown */
@media (max-width: 768px) {
    .countdown-text {
        font-size: 20px;
    }
    
    .countdown-number {
        font-size: 80px;
    }
    
    .countdown-subtitle {
        font-size: 16px;
    }
}

/* Recording Instructions Note */
.recording-note {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid #e74c3c;
    z-index: 1500;
    max-width: 350px;
    animation: slideInFromRight 0.3s ease-out;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.recording-note .recording-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #e74c3c;
    color: white;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
}

.recording-tips {
    color: #2c3e50;
    font-size: 13px;
    line-height: 1.4;
}

.recording-tips p {
    margin: 0;
}

.recording-tips strong {
    color: #e74c3c;
}

.recording-dot {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: recordingPulse 1.5s infinite;
}

@keyframes recordingPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}



/* Video Editor Tutorial Modal */
.tutorial-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: none;
    border-radius: 12px;
    margin: auto; /* Center horizontally */
}

.tutorial-modal h3 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 10px;
    text-align: center;
}

.tutorial-intro {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 16px;
}

.tutorial-features {
    margin-bottom: 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: all 0.2s ease;
}

.feature-item:hover {
    background: #ecf0f1;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 24px;
    min-width: 40px;
    text-align: center;
    background: white;
    padding: 8px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.feature-content h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.feature-content p {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.4;
}

.tutorial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
    flex-wrap: wrap;
    gap: 15px;
}

.dont-show-again {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #7f8c8d;
    cursor: pointer;
    user-select: none;
}

.dont-show-again input[type="checkbox"] {
    margin: 0;
}

#startEditing {
    font-size: 16px;
    padding: 12px 24px;
    min-width: 140px;
}

#stopRecordingFromOverlay {
    margin-top: 10px;
    font-size: 16px;
    padding: 12px 24px;
}

/* Image fallback styling */
.stop-instructions-image[alt]:after {
    content: "📷 " attr(alt);
    display: block;
    padding: 40px;
    background: #f8f9fa;
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    color: #7f8c8d;
    font-size: 14px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-small:hover {
    background: #f8f9fa;
    border-color: #95a5a6;
}

.timeline-track {
    position: relative;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    overflow: hidden;
}

.thumbnail-track {
    width: 100%;
    height: 60px;
    display: block;
    background: #f8f9fa;
}

.waveform-track {
    width: 100%;
    height: 40px;
    display: block;
    background: #fff;
    border-top: 1px solid #e1e5e9;
}

.timeline-scrubber {
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: #e74c3c;
    pointer-events: none;
    z-index: 10;
    transition: left 0.2s ease;
    box-shadow: 0 0 4px rgba(231, 76, 60, 0.6);
    display: block;
    opacity: 1;
}

.timeline-scrubber::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -5px;
    width: 13px;
    height: 13px;
    background: #e74c3c;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.timeline-scrubber::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: -5px;
    width: 13px;
    height: 13px;
    background: #e74c3c;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Enhanced scrubber during playback */
.timeline-scrubber.playing {
    background: #c0392b;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.8);
    transition: left 0.05s linear;
}

.timeline-scrubber.playing::before,
.timeline-scrubber.playing::after {
    background: #c0392b;
    transform: scale(1.1);
}

.timeline-hover-indicator {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgba(52, 152, 219, 0.6);
    pointer-events: none;
    z-index: 8;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.timeline-hover-indicator::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -3px;
    width: 7px;
    height: 7px;
    background: #3498db;
    border-radius: 50%;
    border: 1px solid white;
}

.timeline-track:hover .timeline-hover-indicator {
    opacity: 1;
}

.timeline-tooltip {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
}

.timeline-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
}

.trim-handles {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.trim-handle {
    position: absolute;
    top: 0;
    width: 8px;
    height: 100%;
    background: #3498db;
    cursor: ew-resize;
    pointer-events: all;
    z-index: 15;
    transition: background-color 0.2s ease, transform 0.2s ease;
    border: 1px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.trim-handle:hover {
    background: #2980b9;
    transform: scaleX(1.2);
}

.trim-handle:active {
    background: #21618c;
    transform: scaleX(1.3);
}

.trim-start {
    left: 0;
    border-radius: 0 4px 4px 0;
}

.trim-end {
    right: 0;
    border-radius: 4px 0 0 4px;
}

/* Visual feedback for dragging */
.trim-handle.dragging {
    background: #21618c;
    transform: scaleX(1.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.editing-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label {
    font-weight: 500;
    color: #2c3e50;
    min-width: 40px;
}

.control-group input[type="text"] {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    background: #f8f9fa;
}

.control-group span {
    color: #7f8c8d;
    font-size: 14px;
}

.crop-dimensions {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #2c3e50 !important;
    border: 1px solid #e1e5e9;
}

/* Hide crop overlay by default */
.crop-overlay.hidden {
    display: none;
}

/* Timeline interaction */
.timeline-track {
    cursor: pointer;
}

.timeline-track:hover .timeline-scrubber {
    opacity: 0.7;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    main {
        padding: 20px;
        border-radius: 4px;
    }
    
    .recording-setup {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .recording-setup .options {
        padding: 10px;
    }
    
    .recording-note {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        padding: 12px 15px;
        font-size: 12px;
    }
    
    .recording-note .recording-indicator {
        font-size: 12px;
        padding: 6px 10px;
        margin-bottom: 8px;
    }
    
    .recording-tips {
        font-size: 12px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .status {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .options {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .video-editor {
        padding: 15px;
    }
    
    .editing-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .timeline-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    /* Tutorial modal responsive design */
    .tutorial-modal {
        max-width: 95%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-content {
        margin: 10px; /* Smaller margins on mobile */
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .feature-icon {
        align-self: center;
    }
    
    .tutorial-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .dont-show-again {
        justify-content: center;
    }
} 