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

body {
    font-family: 'Rajdhani', 'Orbitron', sans-serif;
    background-color: #000000;
    color: #f0f0f0;
    padding: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Landing Page Styles */
#landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000000;
    overflow: auto;
}

.hud-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 15% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(255, 255, 255, 0.03) 0%, transparent 30%);
    overflow: hidden;
}

.hud-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent) 0 0 / 200% 100%,
        repeating-linear-gradient(90deg, transparent, transparent 20px, rgba(255, 255, 255, 0.03) 20px, rgba(255, 255, 255, 0.03) 21px) 0 0 / 100% 100%,
        repeating-linear-gradient(0deg, transparent, transparent 20px, rgba(255, 255, 255, 0.03) 20px, rgba(255, 255, 255, 0.03) 21px) 0 0 / 100% 100%;
    animation: hud-scan 8s linear infinite;
}

.hud-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 100px rgba(255, 255, 255, 0.1);
}

@keyframes hud-scan {
    0% { background-position: -200% 0, 0 0, 0 0; }
    100% { background-position: 200% 0, 0 0, 0 0; }
}

.landing-content {
    width: 90%;
    max-width: 1200px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    max-height: 100vh;
    overflow: auto;
}

.landing-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    text-align: center;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
    position: relative;
    padding-bottom: 10px;
    margin: 0;
}

.landing-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
}

.landing-description {
    text-align: center;
    max-width: 800px;
    line-height: 1.4;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.landing-description p {
    margin-bottom: 10px;
}

.demo-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    max-width: 1000px;
    margin: 10px 0;
}

.demo-video {
    flex: 1;
    position: relative;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    height: 250px;
    width: calc(50% - 10px);
}

.demo-video::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    z-index: 1;
}

.demo-video::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    z-index: 1;
}

#demo-original, #demo-ascii {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#demo-ascii {
    width: 100%;
    height: 100%;
    font-family: 'Share Tech Mono', monospace;
    font-size: 4px;
    line-height: 0.8;
    white-space: pre;
    padding: 0;
    color: white;
    background-color: black;
    display: block;
    object-fit: contain;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
}

.landing-button {
    padding: 12px 30px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    margin-top: 5px;
}

.landing-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s;
}

.landing-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.landing-button:hover::before {
    left: 100%;
}

.creator-signature {
    margin-top: 15px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

#app-container {
    display: flex;
    width: 100%;
    height: 100vh;
}

.hidden {
    display: none !important;
}

.sidebar {
    width: 320px;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid #444;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.2);
}

.container {
    flex: 1;
    height: 100vh;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-image: linear-gradient(to bottom, rgba(6, 22, 33, 0.2), rgba(6, 22, 33, 0.4));
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #ffffff;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    font-family: 'Orbitron', sans-serif;
    position: relative;
}

h1::before, h1::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
}

h1::before {
    left: 0;
}

h1::after {
    right: 0;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: rgba(6, 22, 33, 0.7);
    padding: 20px;
    border-radius: 3px;
    border: 1px solid #444;
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.input-section label {
    margin-bottom: 10px;
    font-size: 1.1rem;
    opacity: 1;
    letter-spacing: 0.8px;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.input-section input[type="file"] {
    padding: 18px;
    font-size: 1.2rem;
    background-color: rgba(13, 36, 49, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s;
    cursor: pointer;
}

.input-section input[type="file"]:hover {
    background-color: rgba(20, 45, 60, 0.9);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.input-section::after {
    content: '⟳';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.input-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
    animation: scanline 2s linear infinite;
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    position: relative;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.options > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.option-group {
    margin-bottom: 15px;
    border: 1px solid rgba(180, 180, 180, 0.5);
    padding: 15px;
    border-radius: 3px;
    background-color: rgba(6, 22, 33, 0.7);
    position: relative;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.option-group::after {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-top: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
}

.option-group::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -1px;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
}

.option-title {
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.option-title::before {
    content: '//';
    color: #ffffff;
    margin-right: 8px;
    font-family: monospace;
}

label {
    margin-bottom: 5px;
    font-size: 0.85rem;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

select, input[type="file"], input[type="text"], input[type="number"] {
    padding: 8px;
    background-color: rgba(13, 36, 49, 0.9);
    color: #f0f0f0;
    border: 1px solid #444;
    border-radius: 0px;
    width: 100%;
    font-family: 'Rajdhani', sans-serif;
    position: relative;
    transition: all 0.2s ease;
}

select:focus, input[type="text"]:focus, input[type="number"]:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

input[type="range"] {
    width: 100%;
    background-color: rgba(13, 36, 49, 0.5);
    -webkit-appearance: none;
    height: 5px;
    border-radius: 0;
    border: 1px solid #444;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background: #ffffff;
    border-radius: 0;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
}

.range-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-container span {
    min-width: 30px;
    text-align: right;
    font-family: 'Share Tech Mono', monospace;
    color: #ffffff;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    -webkit-appearance: none;
    appearance: none;
    background-color: rgba(13, 36, 49, 0.9);
    border: 1px solid #444;
    border-radius: 0;
    position: relative;
    cursor: pointer;
}

input[type="checkbox"]:checked {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
}

input[type="checkbox"]:checked::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 4px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.display-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
}

.video-container, .ascii-container {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: rgba(6, 22, 33, 0.7);
    border-radius: 0;
    overflow: hidden;
    border: 1px solid #444;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.video-container::before, .ascii-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) -50%, transparent 20%, transparent 80%, rgba(255, 255, 255, 0.1) 150%),
        linear-gradient(rgba(255, 255, 255, 0.1) -50%, transparent 20%, transparent 80%, rgba(255, 255, 255, 0.1) 150%);
    pointer-events: none;
}

video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
}

#ascii-output {
    width: 100%;
    height: 100%;
    overflow: auto;
    font-family: 'Share Tech Mono', monospace;
    font-size: 6px;
    line-height: 1;
    white-space: pre;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px;
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    contain: content;
    will-change: contents;
}

.video-label {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(6, 22, 33, 0.8);
    padding: 5px 10px;
    border-radius: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 2px solid #ffffff;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

button {
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid #444;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    font-family: 'Rajdhani', sans-serif;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0;
    width: 5px;
    height: 100%;
    background-color: #ffffff;
    transition: all 0.3s;
}

button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

button:hover::before {
    left: 0;
}

button:disabled {
    background-color: rgba(84, 84, 84, 0.2);
    color: #8a8a8a;
    border-color: #515151;
    cursor: not-allowed;
}

button:disabled::before {
    display: none;
}

#save-btn {
    background-color: rgba(200, 200, 200, 0.2);
    color: #f0f0f0;
    border-color: #666;
}

#save-btn:hover {
    background-color: rgba(200, 200, 200, 0.3);
    box-shadow: 0 0 15px rgba(200, 200, 200, 0.3);
}

#recording-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 15px;
    height: 15px;
    background-color: #f44336;
    border-radius: 50%;
    animation: pulse 1s infinite;
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.7);
}

@keyframes pulse {
    0% { opacity: 1; box-shadow: 0 0 10px rgba(244, 67, 54, 0.7); }
    50% { opacity: 0.5; box-shadow: 0 0 15px rgba(244, 67, 54, 1); }
    100% { opacity: 1; box-shadow: 0 0 10px rgba(244, 67, 54, 0.7); }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
        height: auto;
        overflow: auto;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #444;
    }
    
    .display-section {
        height: 60vh;
    }
}