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

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
}

.container-wrapper {
    max-width: 940px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #f97316, #ea580c, #dc2626);
    border-radius: 36px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: var(--text-primary);
    padding: 15px 30px;
    text-align: center;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: logo-entrance 1s ease-out forwards;
}

@keyframes logo-entrance {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-50px);
    }
    60% {
        transform: scale(1.1) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: inline-block;
}

.subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 300;
    margin-top: 5px;
    margin-bottom: 0;
}

main {
    padding: 30px;
}

.input-section,
.output-section {
    margin-bottom: 25px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: var(--bg-color);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

#textOutput {
    background: #f1f5f9;
    color: var(--text-primary);
}

.actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.errors-panel {
    margin-top: 25px;
    padding: 20px;
    background: #fef3c7;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
}

.errors-panel.hidden {
    display: none;
}

.errors-panel h3 {
    margin-bottom: 15px;
    color: #92400e;
    font-size: 1.1rem;
}

.error-item {
    background: white;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
}

.error-message {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 5px;
}

.error-suggestions {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.error-suggestions strong {
    color: var(--success-color);
}

footer {
    background: var(--bg-color);
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .actions {
        grid-template-columns: 1fr;
    }
    
    main {
        padding: 20px;
    }
}

