/* Modern Theme Variables - Single Color Theme */
:root {
    /* Primary Theme (Default) - Based on #1B103D */
    --primary-gradient: linear-gradient(135deg, #1B103D 0%, #2A1A5C 100%);
    --secondary-gradient: linear-gradient(135deg, #2A1A5C 0%, #3D2A7A 100%);
    --success-gradient: linear-gradient(135deg, #1B103D 0%, #4A3B8F 100%);
    --danger-gradient: linear-gradient(135deg, #5C1B3D 0%, #7A2A5C 100%);
    --accent-gradient: linear-gradient(135deg, #1B103D 0%, #2A1A5C 100%);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --border-radius: 16px;
}

/* Light Variant */
[data-theme="white"] {
    --primary-gradient: linear-gradient(135deg, #f8f6fc 0%, #ffffff 100%);
    --secondary-gradient: linear-gradient(135deg, #ede8f5 0%, #f3f0f8 100%);
    --success-gradient: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    --danger-gradient: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    --accent-gradient: linear-gradient(135deg, #1B103D 0%, #2A1A5C 100%);
    --glass-bg: rgba(27, 16, 61, 0.08);
    --glass-border: rgba(27, 16, 61, 0.3);
    --text-primary: #1B103D;
    --text-secondary: #2A1A5C;
    --shadow: 0 8px 32px rgba(27, 16, 61, 0.2);
}

/* Standard Theme */
[data-theme="blue"] {
    --primary-gradient: linear-gradient(135deg, #1B103D 0%, #2A1A5C 100%);
    --secondary-gradient: linear-gradient(135deg, #2A1A5C 0%, #3D2A7A 100%);
    --success-gradient: linear-gradient(135deg, #1B103D 0%, #4A3B8F 100%);
    --danger-gradient: linear-gradient(135deg, #5C1B3D 0%, #7A2A5C 100%);
    --accent-gradient: linear-gradient(135deg, #1B103D 0%, #2A1A5C 100%);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Dark Variant */
[data-theme="dark"] {
    --primary-gradient: linear-gradient(135deg, #0D0A1F 0%, #1B103D 100%);
    --secondary-gradient: linear-gradient(135deg, #1B103D 0%, #2A1A5C 100%);
    --success-gradient: linear-gradient(135deg, #1B103D 0%, #3D2A7A 100%);
    --danger-gradient: linear-gradient(135deg, #3D1B2A 0%, #5C2A3D 100%);
    --accent-gradient: linear-gradient(135deg, #1B103D 0%, #2A1A5C 100%);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #d0d0d0;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* Theme Toggle Styles */
.theme-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.theme-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow);
}

.theme-btn.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.theme-btn.white {
    background: linear-gradient(135deg, #f8f6fc 0%, #ffffff 100%);
    border-color: #1B103D;
}

.theme-btn.blue {
    background: linear-gradient(135deg, #1B103D 0%, #2A1A5C 100%);
}

.theme-btn.dark {
    background: linear-gradient(135deg, #0D0A1F 0%, #1B103D 100%);
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo i {
    font-size: 2rem;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Main Content */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    padding: 2rem;
    height: calc(100vh - 80px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

/* Control Panel */
.control-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    overflow-y: auto;
    height: fit-content;
    max-height: 100%;
}

.panel-section {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.panel-section h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.panel-section h3 i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

#scriptInput {
    width: 100%;
    height: 150px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    resize: vertical;
    backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

#scriptInput:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(255, 255, 255, 0.2);
    outline: none;
}

#scriptInput::placeholder {
    color: var(--text-secondary);
    opacity: 0.8;
}

.controls-grid {
    display: grid;
    gap: 1rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-group label {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--accent-gradient);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

input[type="color"] {
    width: 100%;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    background: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

input[type="color"]:hover {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-success {
    background: var(--success-gradient);
    color: white;
}

.btn-danger {
    background: var(--danger-gradient);
    color: white;
}

.btn-small {
    padding: 0.5rem;
    font-size: 0.8rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn span {
    margin-left: 0.5rem;
}

.auto-record-info {
    margin-bottom: 1rem;
}

.info-text {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
}

.info-text i {
    color: var(--text-primary);
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.theme-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.recording-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recording-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    gap: 0.5rem;
}

#recordingStatus {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.recording-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff4757;
    opacity: 0;
    animation: pulse 1.5s infinite;
}

.recording-dot.active {
    opacity: 1;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Teleprompter Container */
.teleprompter-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.video-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    height: 60%;
    min-height: 400px;
    max-height: 60%;
}

.camera-preview {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    width: 100%;
    height: 100%;
}

#cameraPreview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-controls {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.teleprompter-display {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
    width: 100%;
    height: 100%;
}

.script-content {
    padding: 1rem;
    font-size: 32px;
    line-height: 1.6;
    color: var(--text-primary);
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.teleprompter-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.speed-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem;
    border-radius: 8px;
}

#currentSpeed {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
}

/* Enhanced Button Styles */
.btn-primary.btn-large {
    background: var(--accent-gradient);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    font-size: 1.2rem;
    min-width: 200px;
    justify-content: center;
}

.btn-primary.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Improved Header */
.header-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .control-panel {
        order: 2;
        max-height: 400px;
    }
    
    .teleprompter-container {
        order: 1;
    }
    
    .video-section {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
        height: 60vh;
        min-height: 400px;
        max-height: 60vh;
    }
    
    .camera-preview {
        height: 100%;
    }
    
    .teleprompter-display {
        height: 100%;
    }
    
    .header-controls {
        gap: 1rem;
    }
    
    .theme-selector {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .fullscreen-overlay {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
    }
    
    .fullscreen-video {
        height: 50vh;
    }
    
    .fullscreen-script {
        height: 50vh;
    }
    
    .fullscreen-script-content {
        height: 50vh;
    }
    
    .fullscreen-script-content {
        font-size: 32px;
        padding: 2rem;
    }
}

/* Enhanced Mobile Styles */
@media (max-width: 768px) {
    /* Header Mobile Optimization */
    .header {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.75rem;
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .logo {
        justify-content: center;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .header-controls {
        justify-content: center;
        gap: 1rem;
    }
    
    .theme-selector {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .theme-btn {
        width: 32px;
        height: 32px;
    }
    
    /* Main Content Mobile Layout */
    .main-content {
        padding: 0.75rem;
        height: auto;
        min-height: calc(100vh - 120px);
    }
    
    .control-panel {
        order: 2;
        max-height: none;
        margin-top: 1rem;
    }
    
    .teleprompter-container {
        order: 1;
    }
    
    /* Video Section Mobile Optimization */
    .video-section {
        height: 60vh;
        min-height: 350px;
        max-height: 60vh;
        gap: 0.75rem;
    }
    
    .camera-preview {
        height: 100%;
        border-radius: 12px;
    }
    
    .teleprompter-display {
        height: 100%;
        border-radius: 12px;
    }
    
    .script-content {
        padding: 0.75rem;
        font-size: 20px;
        line-height: 1.4;
    }
    
    /* Mobile Touch-Friendly Controls */
    .teleprompter-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
        padding: 1rem 0.75rem;
    }
    
    .btn {
        min-height: 44px; /* iOS touch target minimum */
        touch-action: manipulation;
    }
    
    .btn-large {
        padding: 1rem 1.25rem;
        font-size: 1rem;
        min-width: 180px;
        width: 100%;
        max-width: 280px;
    }
    
    .btn-secondary {
        padding: 0.75rem 1rem;
        min-width: 120px;
    }
    
    .btn-small {
        padding: 0.75rem;
        font-size: 0.9rem;
        min-width: 44px;
        min-height: 44px;
    }
    
    .speed-controls {
        background: rgba(255, 255, 255, 0.2);
        padding: 0.75rem;
        border-radius: 12px;
        gap: 0.75rem;
    }
    
    #currentSpeed {
        min-width: 24px;
        font-size: 1rem;
    }
    
    /* Mobile Control Panel */
    .panel-section {
        margin-bottom: 1.5rem;
    }
    
    .panel-section h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    #scriptInput {
        height: 120px;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
    }
    
    .controls-grid {
        gap: 1rem;
    }
    
    .control-group label {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }
    
    input[type="range"] {
        height: 8px;
        -webkit-appearance: none;
        appearance: none;
    }
    
    input[type="range"]::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
        -webkit-appearance: none;
        appearance: none;
    }
    
    input[type="color"] {
        height: 44px;
        border-radius: 12px;
    }
    
    /* Mobile Fullscreen Enhancements */
    .fullscreen-overlay {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
    }
    
    .fullscreen-video {
        height: 60vh;
        order: 1;
    }
    
    .fullscreen-script {
        height: 40vh;
        order: 2;
    }
    
    .fullscreen-script-content {
        font-size: 18px;
        padding: 1rem;
        line-height: 1.4;
    }
    
    .fullscreen-controls {
        position: fixed;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        transform: none;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem;
        border-radius: 12px;
        justify-content: center;
    }
    
    .fullscreen-speed-controls {
        background: rgba(255, 255, 255, 0.2);
        padding: 0.5rem;
        border-radius: 8px;
        gap: 0.5rem;
    }
    
    /* Mobile Content Sections */
    .hero-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
        padding: 0 1rem;
    }
    
    .hero-text h2 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .hero-text p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-features {
        justify-content: center;
        gap: 1rem;
    }
    
    .feature-item {
        font-size: 0.9rem;
    }
    
    .image-placeholder {
        height: 200px;
    }
    
    .why-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .why-item {
        padding: 1.5rem;
    }
    
    .why-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .benefit-box {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }
    
    .benefit-icon {
        margin-bottom: 0.75rem;
    }
    
    .section-container {
        padding: 0 1rem;
    }
    
    .hero-section,
    .why-section,
    .benefits-section,
    .faq-section {
        padding: 2.5rem 0;
    }
    
    .faq-question {
        padding: 1rem;
    }
    
    .faq-answer {
        padding: 0 1rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1rem 1rem;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    .main-content {
        padding: 0.5rem;
    }
    
    .video-section {
        height: 55vh;
        min-height: 300px;
    }
    
    .script-content {
        font-size: 18px;
        padding: 0.5rem;
    }
    
    .btn-large {
        min-width: 140px;
        font-size: 0.9rem;
    }
    
    .hero-text h2 {
        font-size: 1.5rem;
    }
    
    .fullscreen-script-content {
        font-size: 16px;
        padding: 0.75rem;
    }
    
    .control-panel {
        padding: 1rem;
    }
    
    .panel-section {
        margin-bottom: 1rem;
    }
}

/* Mobile-Specific Enhancements */
.mobile-device {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.mobile-device .btn {
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s ease;
}

.mobile-device .btn:active {
    transform: scale(0.95);
}

.mobile-device input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
}

.mobile-device input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

/* Mobile Fullscreen Optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .fullscreen-overlay {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
    }
    
    .fullscreen-video {
        height: 100vh;
        order: 1;
    }
    
    .fullscreen-script {
        height: 100vh;
        order: 2;
    }
    
    .fullscreen-script-content {
        font-size: 20px;
        padding: 1.5rem;
    }
    
    .fullscreen-controls {
        bottom: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        padding: 0.5rem;
    }
}

/* Touch-friendly hover states for mobile */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }
    
    .why-item:hover,
    .benefit-box:hover,
    .faq-question:hover {
        transform: none;
        background: inherit;
    }
    
    /* Use active states instead of hover for touch devices */
    .btn:active {
        transform: scale(0.95);
    }
    
    .why-item:active {
        transform: scale(0.98);
    }
    
    .benefit-box:active {
        transform: scale(0.98);
    }
}

/* Prevent text selection on mobile for better UX */
.mobile-device .script-content,
.mobile-device .fullscreen-script-content {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Mobile keyboard adjustments */
@media (max-width: 768px) {
    .mobile-device input:focus,
    .mobile-device textarea:focus {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
}

/* Fullscreen Overlay Styles */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: var(--primary-gradient);
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0;
}

.fullscreen-overlay.hidden {
    display: none;
}

.fullscreen-video {
    position: relative;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.fullscreen-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fullscreen-script {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
}

.fullscreen-script-content {
    padding: 2rem;
    font-size: 48px;
    line-height: 1.6;
    color: var(--text-primary);
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.fullscreen-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
}

.fullscreen-speed-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem;
    border-radius: 8px;
}

/* Scrolling Animation for Fullscreen */
.fullscreen-script.scrolling .fullscreen-script-content {
    animation: scroll-up linear infinite;
}

/* Scrolling Animation */
.scrolling .script-content {
    animation: scroll-up linear infinite;
}

@keyframes scroll-up {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(-100%);
    }
}

/* White Theme Specific Styles */
[data-theme="white"] .control-panel {
    background: rgba(27, 16, 61, 0.05);
    border: 2px solid rgba(27, 16, 61, 0.2);
}

[data-theme="white"] .camera-preview {
    background: rgba(27, 16, 61, 0.03);
    border: 2px solid rgba(27, 16, 61, 0.2);
}

[data-theme="white"] .teleprompter-display {
    background: rgba(27, 16, 61, 0.03);
    border: 2px solid rgba(27, 16, 61, 0.2);
}

[data-theme="white"] .teleprompter-controls {
    background: rgba(27, 16, 61, 0.05);
    border: 2px solid rgba(27, 16, 61, 0.2);
}

[data-theme="white"] .hero-section {
    background: rgba(27, 16, 61, 0.03);
    border-top: 2px solid rgba(27, 16, 61, 0.3);
    border-bottom: 2px solid rgba(27, 16, 61, 0.3);
}

[data-theme="white"] .why-section {
    background: rgba(27, 16, 61, 0.02);
    border-bottom: 2px solid rgba(27, 16, 61, 0.3);
}

[data-theme="white"] .benefits-section {
    background: rgba(27, 16, 61, 0.03);
    border-bottom: 2px solid rgba(27, 16, 61, 0.3);
}

[data-theme="white"] .faq-section {
    background: rgba(27, 16, 61, 0.02);
    border-bottom: 2px solid rgba(27, 16, 61, 0.3);
}

[data-theme="white"] .why-item {
    background: rgba(27, 16, 61, 0.04);
    border: 2px solid rgba(27, 16, 61, 0.15);
    box-shadow: 0 4px 16px rgba(27, 16, 61, 0.1);
}

[data-theme="white"] .why-item:hover {
    background: rgba(27, 16, 61, 0.08);
    border: 2px solid rgba(27, 16, 61, 0.25);
    box-shadow: 0 8px 24px rgba(27, 16, 61, 0.15);
    transform: translateY(-5px);
}

[data-theme="white"] .benefit-box {
    background: rgba(27, 16, 61, 0.04);
    border: 2px solid rgba(27, 16, 61, 0.15);
}

[data-theme="white"] .benefit-box:hover {
    background: rgba(27, 16, 61, 0.08);
    border: 2px solid rgba(27, 16, 61, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 16, 61, 0.12);
}

[data-theme="white"] .faq-item {
    background: rgba(27, 16, 61, 0.04);
    border: 2px solid rgba(27, 16, 61, 0.15);
}

[data-theme="white"] .faq-question:hover {
    background: rgba(27, 16, 61, 0.08);
}

[data-theme="white"] .image-placeholder {
    background: rgba(27, 16, 61, 0.03);
    border: 2px dashed rgba(27, 16, 61, 0.3);
}

[data-theme="white"] #scriptInput {
    background: rgba(27, 16, 61, 0.05);
    border: 1px solid rgba(27, 16, 61, 0.2);
}

[data-theme="white"] .recording-status {
    background: rgba(27, 16, 61, 0.05);
}

[data-theme="white"] .speed-controls {
    background: rgba(27, 16, 61, 0.08);
}

[data-theme="white"] .fullscreen-speed-controls {
    background: rgba(27, 16, 61, 0.08);
}

[data-theme="white"] .info-text {
    background: rgba(27, 16, 61, 0.04);
    border: 1px solid rgba(27, 16, 61, 0.15);
}

/* White Theme Button Enhancements */
[data-theme="white"] .btn-secondary {
    background: rgba(27, 16, 61, 0.05);
    border: 1px solid rgba(27, 16, 61, 0.2);
    color: #1B103D;
}

[data-theme="white"] .btn-secondary:hover {
    background: rgba(27, 16, 61, 0.1);
    border: 1px solid rgba(27, 16, 61, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 16, 61, 0.15);
}

[data-theme="white"] .btn-primary {
    background: var(--accent-gradient);
    color: white;
}

[data-theme="white"] .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(27, 16, 61, 0.25);
}

[data-theme="white"] .btn-success {
    background: linear-gradient(135deg, #1B103D 0%, #2A1A5C 100%);
    color: white;
}

[data-theme="white"] .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(27, 16, 61, 0.25);
}

/* White Theme Panel Section Enhancements */
[data-theme="white"] .panel-section {
    border-bottom: 1px solid rgba(27, 16, 61, 0.1);
    padding-bottom: 1.5rem;
}

[data-theme="white"] .panel-section:last-child {
    border-bottom: none;
}

/* White Theme Feature Items */
[data-theme="white"] .feature-item {
    background: rgba(27, 16, 61, 0.03);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(27, 16, 61, 0.1);
}

[data-theme="white"] .feature-item:hover {
    background: rgba(27, 16, 61, 0.06);
    border: 1px solid rgba(27, 16, 61, 0.2);
}

/* White Theme Logo Visibility Fix */
[data-theme="white"] .logo i {
    color: #1B103D; /* Fallback solid color */
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="white"] .logo h1 {
    color: #1B103D; /* Fallback solid color */
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* White Theme Gradient Text Fixes */
[data-theme="white"] .panel-section h3 i {
    color: #1B103D;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="white"] .hero-text h2 {
    color: #1B103D;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="white"] .feature-item i {
    color: #1B103D;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="white"] .image-placeholder i {
    color: #1B103D;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Dark Theme Logo & Text Visibility Fixes */
[data-theme="dark"] .logo i {
    color: #ffffff;
    background: linear-gradient(135deg, #4A3B8F 0%, #6B5B9F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .logo h1 {
    color: #ffffff;
    background: linear-gradient(135deg, #4A3B8F 0%, #6B5B9F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .panel-section h3 i {
    color: #ffffff;
    background: linear-gradient(135deg, #4A3B8F 0%, #6B5B9F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .hero-text h2 {
    color: #ffffff;
    background: linear-gradient(135deg, #4A3B8F 0%, #6B5B9F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .feature-item i {
    color: #ffffff;
    background: linear-gradient(135deg, #4A3B8F 0%, #6B5B9F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .image-placeholder i {
    color: #ffffff;
    background: linear-gradient(135deg, #4A3B8F 0%, #6B5B9F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Fallback for browsers that don't support background-clip */
@supports not (-webkit-background-clip: text) {
    [data-theme="white"] .logo i,
    [data-theme="white"] .logo h1,
    [data-theme="white"] .panel-section h3 i,
    [data-theme="white"] .hero-text h2,
    [data-theme="white"] .feature-item i,
    [data-theme="white"] .image-placeholder i {
        color: #1B103D !important;
        background: none !important;
    }
    
    [data-theme="dark"] .logo i,
    [data-theme="dark"] .logo h1,
    [data-theme="dark"] .panel-section h3 i,
    [data-theme="dark"] .hero-text h2,
    [data-theme="dark"] .feature-item i,
    [data-theme="dark"] .image-placeholder i {
        color: #ffffff !important;
        background: none !important;
    }
}

/* Content Sections */
.content-sections {
    background: var(--primary-gradient);
    padding: 0;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero-section {
    padding: 4rem 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-features {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.feature-item i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.2rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-placeholder {
    width: 100%;
    height: 300px;
    background: var(--glass-bg);
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-secondary);
}

.image-placeholder i {
    font-size: 4rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Why Section */
.why-section {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.why-section h2 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.why-item {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.why-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.why-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.why-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.why-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Benefits Section */
.benefits-section {
    padding: 4rem 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.benefits-section h2 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.benefit-box {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s ease;
}

.benefit-box:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.benefit-icon {
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.benefit-box h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.benefit-box p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.faq-section h2 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.faq-container {
    max-width: 800px;
    margin: 3rem auto 0;
}

.faq-item {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-question {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.08);
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.faq-question i {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 1.5rem 1.5rem;
    max-height: 200px;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-text h2 {
        font-size: 2rem;
    }
    
    .hero-features {
        justify-content: center;
    }
    
    .why-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .benefit-box {
        flex-direction: column;
        text-align: center;
    }
    
    .section-container {
        padding: 0 1rem;
    }
    
    .hero-section,
    .why-section,
    .benefits-section,
    .faq-section {
        padding: 2rem 0;
    }
}