/* Main container */
.grammar-checker {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 10px;
    max-width: 1200px;
    margin: 0 auto;
	  margin-bottom: 10px;
    position: relative; /* Added */
}

/* Column styling */
.column {
    flex: 1;
    min-width: 0;
    margin-bottom: 60px;
}

/* Text areas */
#input-text {
    width: 100%;
    height: 300px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    resize: vertical;
}

#result {
    width: 100%;
    height: 300px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 16px;
    line-height: 1.5;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Button container */
.button-container {
    position: absolute; /* Changed */
    bottom: 0; /* Added */
    left: 50%; /* Added */
    transform: translateX(-50%); /* Added */
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Button styles */
#fix-grammar, #copy-button {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    border: none;
}

#fix-grammar {
    background: #0066ff;
    color: white;
}

#fix-grammar:hover {
    background: #0052cc;
}

#copy-button {
    background: #f0f0f0;
    color: #333;
}

#copy-button:hover {
    background: #e0e0e0;
}

#copy-button.copied {
    background: #4CAF50;
    color: white;
}

/* Correction styling */
.correction {
    background-color: #e6f3ff;
    color: #0066cc;
    padding: 0 2px;
    border-radius: 3px;
    font-weight: 500;
    display: inline;
    white-space: pre-wrap;
    word-wrap: break-word;
    cursor: help;
    position: relative;
}

.correction:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    white-space: normal;
    max-width: 200px;
    word-wrap: break-word;
    z-index: 1000;
    margin-bottom: 5px;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Success message */
.success-message {
    background-color: #f0fff4;
    border: 1px solid #68d391;
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
}

.success-message p {
    color: #2f855a;
    font-weight: 600;
    margin: 0 0 10px 0;
}

/* Change message */
.change-message {
    color: #666;
    font-size: 0.9em;
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

/* Text styles */
.original-text, .corrected-text {
    color: #2d3748;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 10px;
}

/* Responsive design */
@media (max-width: 768px) {
    .grammar-checker {
        flex-direction: column;
    }
    
    .column {
        width: 100%;
    }
    
    #input-text, #result {
        height: 250px;
    }
}

/* Global styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}
