/* Textly - AI Text Correction Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    flex: 1;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.messages {
    margin-bottom: 1.5rem;
}

.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 500;
}

.message.error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.message.success {
    background-color: #efe;
    color: #363;
    border: 1px solid #cfc;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

textarea, select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

textarea {
    resize: vertical;
    min-height: 150px;
}

textarea:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

select {
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.btn-primary:disabled {
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary .loader {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.results {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
}

.results h2 {
    color: #2d5a2d;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.result-box {
    position: relative;
    background: #f8fdf8;
    border: 2px solid #d4e6d4;
    border-radius: 8px;
    padding: 20px 50px 20px 20px;
    margin-bottom: 1.5rem;
}

.result-content {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 10px;
    padding-right: 10px;
}

.btn-copy {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
    position: absolute;
    top: -15px;
    right: 15px;
    min-width: 70px;
    z-index: 10;
}

.btn-copy:hover {
    background: #218838;
}

.comparison {
    margin-top: 2rem;
}

.comparison h3 {
    color: #555;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.comparison-grid h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #666;
}

.text-box {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100px;
}

.original .text-box {
    background: #fff5f5;
    border-color: #fecaca;
}

.corrected .text-box,
.processed .text-box {
    background: #f0fff4;
    border-color: #c6f6d5;
}

footer {
    text-align: center;
    margin-top: 2rem;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 1.5rem;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .btn-copy {
        position: static;
        display: block;
        width: 100%;
        margin-top: 10px;
    }
}