﻿.grammar-container {
    max-width: 1300px;
    margin: 40px auto;
    padding: 30px;
    background: linear-gradient(135deg, #f3f4f6, #ffffff);
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1), 0 2px 10px rgba(0, 0, 0, 0.05);
    animation: slideIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.grammar-title {
    font-size: 2.5rem;
    color: #1a73e8 !important;
    text-align: center;
    margin-bottom: 25px;
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.grammar-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 10px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.grammar-textarea {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    border: 2px solid #e0e7ff;
    border-radius: 10px;
    resize: vertical;
    transition: all 0.4s ease;
    background: #f9fafb;
    font-family: 'Open Sans', sans-serif;
}

    .grammar-textarea:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.3), inset 0 0 5px rgba(59, 130, 246, 0.1);
        outline: none;
        transform: scale(1.02);
    }

.grammar-submit-btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    background: linear-gradient(45deg, #3b82f6, #60a5fa);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

    .grammar-submit-btn::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.6s ease, height 0.6s ease;
        z-index: -1;
    }


    .grammar-submit-btn:hover {
        background: linear-gradient(45deg, #1e40af, #3b82f6);
        box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    }

.grammar-result {
    margin-top: 25px;
    padding: 20px;
    border-radius: 10px;
    display: none;
    position: relative;
    overflow: hidden;
}

    .grammar-result.error {
        background: #fee2e2;
        border-left: 5px solid #dc2626;
        color: #991b1b;
    }

    .grammar-result.success {
        background: #d1fae5;
        border-left: 5px solid #10b981;
        color: #047857;
    }

    .grammar-result.fade-in {
        display: block;
        animation: fadeIn 0.6s ease-in-out;
    }

    .grammar-result::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
        animation: gradientMove 2s infinite;
    }

.suggestion-text {
    color: #10b981;
    font-weight: 600;
}

.corrected-text-container {
    display: inline-block;
    position: relative;
}

.corrected-text-error {
    text-decoration: underline wavy red; /* Gạch chân đỏ cho lỗi gốc */
    background-color: #fee2e2; /* Tô màu đỏ nhạt */
}

.corrected-text-fixed {
    background-color: #d1fae5; /* Tô màu xanh nhạt cho phần đã sửa */
    padding: 2px 5px;
    border-radius: 3px;
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientMove {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}
