:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --warning-color: #f8961e;
    --danger-color: #f94144;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --text-color: #2b2d42;
    --text-light: #8d99ae;
    --border-color: #dee2e6;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f1faee;
    color: var(--text-color);
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

header .subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

main {
    padding: 1.5rem;
    flex: 1;
}

.upload-area {
    border: 2px dashed var(--primary-color);
    border-radius: 10px;
    padding: 2rem 1rem;
    text-align: center;
    margin-bottom: 2rem;
    transition: var(--transition);
    background-color: rgba(67, 97, 238, 0.05);
    position: relative;
}

.upload-area.highlight {
    background-color: rgba(67, 97, 238, 0.1);
    border-color: var(--primary-dark);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-area p {
    margin: 0.5rem 0;
    color: var(--text-light);
}

.file-info {
    font-size: 0.9rem;
    margin-top: 1rem !important;
    font-weight: 500;
    color: var(--primary-color) !important;
}

.result-area {
    display: none;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-area h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.text-container {
    position: relative;
    margin-bottom: 1.5rem;
}

#textOutput {
    width: 100%;
    min-height: 300px;
    max-height: 500px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    resize: vertical;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    background-color: var(--light-color);
    transition: var(--transition);
}

#textOutput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.action-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.btn i {
    font-size: 0.9em;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.primary {
    background-color: var(--primary-color);
    color: white;
}

.primary:hover {
    background-color: var(--primary-dark);
}

.success {
    background-color: var(--success-color);
    color: white;
}

.success:hover {
    background-color: #3ab5d8;
}

.warning {
    background-color: var(--warning-color);
    color: white;
}

.warning:hover {
    background-color: #e68a19;
}

.danger {
    background-color: var(--danger-color);
    color: white;
}

.danger:hover {
    background-color: #e82c2f;
}

.status {
    padding: 1rem;
    margin: 1rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.status.info {
    display: block;
    background-color: #e7f5ff;
    color: #1864ab;
    border: 1px solid #a5d8ff;
}

.status.success {
    display: block;
    background-color: #ebfbee;
    color: #2b8a3e;
    border: 1px solid #b2f2bb;
}

.status.error {
    display: block;
    background-color: #fff5f5;
    color: #c92a2a;
    border: 1px solid #ffc9c9;
}

footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .container {
        border-radius: 0;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 1.5rem 1rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
    
    #textOutput {
        min-height: 200px;
    }
}