.app-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 0;
    max-width: 1200px;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0 auto;
}

.main-content {
    padding: 40px;
}

.editor-section {
    height: 450px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}

.section-title::before {
    content: '';
    width: 120px;
    height: 20px;
    border-radius: 2px;
}

.upload-btn {
    padding: 8px 16px;
    background: #5fb9f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.upload-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.code-editor-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    width: 100%;
    height: 400px;
}

.editor-header {
    background: #f7fafc;
    padding: 12px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27ca3f;
}

.editor-title {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    margin-left: 10px;
}

.code-input-container {
    position: relative;
    width: 100%;
}

.code-output-container {
    position: relative;
    width: 100%;
}

.code-input {
    width: 100%;
    background: #1a202c;
    color: #f8f8f2;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    padding: 20px;
    border: none;
    outline: none;
    resize: none;
    white-space: pre;
    word-wrap: normal;
    overflow: auto;
    border-radius: 0 0 12px 12px;
    caret-color: #f8f8f2;
    transition: all 0.3s ease;
    height: 351px;
}


.code-input-container.drag-over .code-input {
    background: #0f3151;
    border: 2px dashed #3182ce;
}

.code-input-container.drag-over::after {
    content: '📁 Drop your JavaScript file here';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #3182ce;
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    pointer-events: none;
    z-index: 10;
    animation: pulse 1s infinite;
}

.code-input-container.drag-error .code-input {
    background: #2d1b1b;
    border: 2px dashed #ff5555;
    transform: scale(1.02);
}

.code-input-container.drag-error::after {
    content: '❌ Multiple files detected - drop one file only';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 85, 85, 0.9);
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    pointer-events: none;
    z-index: 10;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translate(-50%, -50%) translateX(0);
    }

    25% {
        transform: translate(-50%, -50%) translateX(-5px);
    }

    75% {
        transform: translate(-50%, -50%) translateX(5px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.code-input::placeholder {
    color: #a0aec0;
    font-style: italic;
}

.code-output {
    width: 100%;
    background: #1a202c;
    color: #f8f8f2;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    padding: 20px;
    height: 351px;
    border: none;
    outline: none;
    resize: none;
    white-space: pre;
    word-wrap: normal;
    overflow: auto;
    border-radius: 0 0 12px 12px;
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.code-output:focus {
    outline: none;
}

/* Prevent page-wide selection when using Ctrl+A */
.code-output * {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Syntax highlighting for output */
.code-output .hljs-keyword {
    color: #ff79c6 !important;
    font-weight: bold;
}

.code-output .hljs-string {
    color: #f1fa8c !important;
}

.code-output .hljs-number {
    color: #bd93f9 !important;
}

.code-output .hljs-comment {
    color: #6272a4 !important;
    font-style: italic;
}

.code-output .hljs-function {
    color: #8be9fd !important;
}

.code-output .hljs-variable {
    color: #ff5555 !important;
}

.code-output .hljs-title {
    color: #50fa7b !important;
    font-weight: bold;
}

.code-output .hljs-attr {
    color: #50fa7b !important;
}

.code-output .hljs-built_in {
    color: #ffb86c !important;
}

.code-output .hljs-literal {
    color: #bd93f9 !important;
}

.code-output .hljs-name {
    color: #50fa7b !important;
}

.code-output .hljs-property {
    color: #8be9fd !important;
}

.code-output .hljs-punctuation {
    color: #f8f8f2 !important;
}

.code-output .hljs-tag {
    color: #ff79c6 !important;
}

.code-output .hljs-selector-tag {
    color: #ff79c6 !important;
}

.code-output .hljs-selector-class {
    color: #50fa7b !important;
}

.code-output .hljs-selector-id {
    color: #50fa7b !important;
}

.action-panel {
    display: flex;
    justify-content: center;
    padding-top: 50px;
}

.process-btn {
    padding: 16px 32px;
    background: linear-gradient(135deg, #67aff3 0%, #2264a1 100%);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 177, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.process-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 139, 189, 0.3);
}

.process-btn:active {
    transform: translateY(0);
}

.process-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.process-btn::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: left 0.5s;
}

.process-btn:hover::before {
    left: 100%;
}

.output-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    pointer-events: none;
    margin-top: 50px;
}

.output-section.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.output-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    justify-content: flex-end;
}

.toolbar-btn {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #4a5568;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toolbar-btn:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

.toolbar-btn.copy {
    background: #48bb78;
    color: white;
    border-color: #48bb78;
}

.toolbar-btn.copy:hover {
    background: #38a169;
}

.toolbar-btn.download {
    background: #4299e1;
    color: white;
    border-color: #4299e1;
}

.toolbar-btn.download:hover {
    background: #3182ce;
}

.toolbar-btn.clear {
    background: #f56565;
    color: white;
    border-color: #f56565;
}

.toolbar-btn.clear:hover {
    background: #e53e3e;
}

.status-indicator {
    position: fixed;
    top: 100px;
    right: 0px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.status-indicator.success {
    background: #48bb78;
}

.status-indicator.error {
    background: #f56565;
}

.status-indicator.show {
    transform: translateX(0);
}

.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff40;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }

    .app-container {
        width: 95%;
    }

    .section-title::before {
        width: 0px;
    }

    .process-btn {
        padding: 10px 20px;
        font-size: 15px;
    }

    .output-toolbar {
        justify-content: center;
        flex-wrap: wrap;
    }

    .status-indicator {
        top: 80px;
    }
}