main#main {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.tool-main-div {
    margin-top: 0 !important;
    border-radius: 10px;
}


textarea#grammarText {
   border: 2px solid #1e57ba;
    border-radius:10px;
    padding:10px;
    transition:0.3s ease-in-out;
}

.grammar-corrector-widget {
		    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
		    max-width: 1200px;
		    margin: 0 auto;
		    background: #fff;
		    border-radius: 8px;
		    box-shadow: 0 2px 10px rgba(0, 89, 255, 0.089);
		    overflow: hidden;
		}

		.grammar-form-container {
		    background: #f8f9fa;
		    padding: 20px;
		    border-bottom: 1px solid #e9ecef;
		}

		#grammar_form {
		    margin: 0;
		}

		#grammar_text {
		    width: 100%;
		    min-height: 120px;
		    padding: 15px;
		    border: 2px solid #e9ecef;
		    border-radius: 8px;
		    font-family: inherit;
		    font-size: 16px;
		    line-height: 1.5;
		    resize: vertical;
		    transition: border-color 0.3s ease;
		    box-sizing: border-box;
		}

		#grammar_text:focus {
		    outline: none;
		    border-color: #0066cc;
		    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
		}

		#grammar_form button[type="submit"] {
		    background: linear-gradient(135deg, #0066cc, #004499);
		    color: white;
		    border: none;
		    border-radius: 6px;
		    padding: 12px 24px;
		    margin-top: 15px;
		    cursor: pointer;
		    font-size: 16px;
		    font-weight: 600;
		    transition: all 0.3s ease;
		}

		#grammar_form button[type="submit"]:hover {
		    background: linear-gradient(135deg, #004499, #003366);
		    transform: translateY(-1px);
		    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
		}

		#grammar_stats {
		    background: #f8f9fa;
		    padding: 15px 20px;
		    border-bottom: 1px solid #e9ecef;
		}

		.stats-container {
            display: flex;
            align-items: center;
            gap: 10px;
            
        }

		.stat-item {
		    display: flex;
		    align-items: center;
		    gap: 5px;
		}

		.stat-number {
		    font-size: 20px;
		    font-weight: bold;
		    color: #333;
		}

		.stat-success .stat-number {
		    color: #28a745;
		}

		.stat-warning .stat-number {
		    color: #ffc107;
		}

		.stat-label {
		    color: #666;
		    font-size: 14px;
		}

		.stat-divider {
		    width: 1px;
		    height: 20px;
		    background: #dee2e6;
		}

		.grammar-container {
		    display: flex;
		    min-height: 400px;
		}

		#grammar_result {
		    flex: 2;
		    padding: 25px;
		    background: #fff;
		    font-size: 16px;
		    line-height: 1.8;
		    border-right: 1px solid #e9ecef;
		    overflow-y: auto;
		}

		.grammar-sidebar-container {
		    flex: 1;
		    background: #f8f9fa;
		    display: flex;
		    flex-direction: column;
		}

		#accept-all {
		    background: linear-gradient(135deg, #28a745, #20c997);
		    color: white;
		    border: none;
		    padding: 12px 20px;
		    margin: 20px;
		    border-radius: 6px;
		    cursor: pointer;
		    font-size: 16px;
		    font-weight: 600;
		    transition: all 0.3s ease;
		}

		#accept-all:hover {
		    background: linear-gradient(135deg, #20c997, #17a2b8);
		    transform: translateY(-1px);
		    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
		}

		#grammar_sidebar {
		    flex: 1;
		    overflow-y: auto;
		    padding: 0 20px 20px;
		}

		.suggestion-header {
          background: #0066ccdb !important;
          padding: 12px 15px;
          border-bottom: 1px solid #e9ecef;
          display: flex;
          align-items: center;
          gap: 8px;
        }
        
         .suggestions-header {
            background: #0000000f;
        }
                 
		.suggestions-header h3 {
            padding: 10px;
            border-left: 3px solid #229519;
            background: #85dd6a2e;
            margin: 15px 0;
        }

		.suggestion-card {
		    background: white;
		    border: 1px solid #0066cc;
		    border-radius: 8px;
		    margin-bottom: 15px;
		    transition: all 0.3s ease;
		    overflow: hidden;
		    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
		}


		.suggestion-card.suggestion-highlighted {
		    border-color: #0066cc;
		    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
		}

		.suggestion-header {
		    background: #f8f9fa;
		    padding: 12px 15px;
		    border-bottom: 1px solid #e9ecef;
		    display: flex;
		    align-items: center;
		    gap: 8px;
		}

		.category-icon {
		    font-size: 16px;
		}

		.category-text {
            color: #666;
            font-size: 14px;
            font-weight: 700;
            color: #fff;
        }

		.suggestion-content {
		    padding: 15px;
		}

		.correction-preview {
		    display: flex;
		    align-items: center;
		    gap: 10px;
		    margin-bottom: 15px;
		    flex-wrap: wrap;
		}

		.original-text {
		    background: #fff3cd;
		    padding: 4px 8px;
		    border-radius: 4px;
		    border: 1px solid #ffeaa7;
		    font-weight: 500;
		}

		.arrow {
		    color: #666;
		    font-weight: bold;
		}

		.corrected-text {
		    background: #d4edda;
		    color: #155724;
		    padding: 4px 8px;
		    border-radius: 4px;
		    border: 1px solid #c3e6cb;
		    font-weight: 500;
		}

		.suggestion-actions {
		    display: flex;
		    gap: 10px;
		}

		.accept-btn {
		    background: #0066cc;
		    color: white;
		    border: none;
		    border-radius: 6px;
		    padding: 8px 16px;
		    cursor: pointer;
		    font-size: 14px;
		    font-weight: 500;
		    display: flex;
		    align-items: center;
		    gap: 5px;
		    transition: all 0.3s ease;
		    justify-content:center;
		      border:1px solid #004499;
		}

		.accept-btn:hover {
            background: #fff;
            color:#004499;
            border:1px solid #004499;
        }

		.ignore-btn {
            background: #d72323ed;
            color: #fff;
            border: 1px solid #d72323ed;
            border-radius: 6px;
            padding: 8px 16px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s ease;
        }

		.ignore-btn:hover {
            background: #fff;
            color: #d72323ed;
            border:1px solid #d72323ed;
        }

		.grammar-error {
            background: #fff3cd;
            border-bottom: 2px solid #ffc107;
            border-radius: 3px;
            padding: 4px 6px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

		.grammar-error:hover {
		    background: #ffeaa7;
		    border-bottom-color: #e0a800;
		}

		.ignored-error {
		    background: #f8f9fa;
		    color: #6c757d;
		    text-decoration: line-through;
		}

		.no-corrections {
		    text-align: center;
		    padding: 40px 20px;
		    color: #28a745;
		    font-size: 18px;
		    font-weight: 500;
		}

		.no-corrections .checkmark {
		    font-size: 24px;
		    margin-right: 10px;
		}

		.all-done {
		    text-align: center;
		    padding: 30px 20px;
		    color: #28a745;
		    font-size: 16px;
		    font-weight: 500;
		}

		.all-done .checkmark {
		    font-size: 20px;
		    margin-right: 8px;
		}

		.loading {
		    text-align: center;
		    padding: 40px 20px;
		    color: #666;
		    font-style: italic;
		}

		.checkmark {
		    color: #28a745;
		}

		/* Responsive Design */
		@media (max-width: 768px) {
		    .grammar-container {
		        flex-direction: column;
		    }

		    #grammar_result {
		        border-right: none;
		        border-bottom: 1px solid #e9ecef;
		    }

		    .stats-container {
		        justify-content: center;
		    }

		    .correction-preview {
		        /*flex-direction: column;*/
		        align-items: flex-start;
		    }

		    .suggestion-actions {
		        /*flex-direction: column;*/
		    }
		}


		/* Circular Loader Styles */
		.loader-overlay {
		    position: fixed;
		    top: 0;
		    left: 0;
		    width: 100%;
		    height: 100%;
		    background: rgba(0, 0, 0, 0.7);
		    display: flex;
		    justify-content: center;
		    align-items: center;
		    z-index: 9999;
		    opacity: 0;
		    visibility: hidden;
		    transition: opacity 0.3s ease, visibility 0.3s ease;
		}

		.loader-overlay.active {
		    opacity: 1;
		    visibility: visible;
		}

		.loader-container {
		    background: white;
		    border-radius: 15px;
		    padding: 40px;
		    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
		    text-align: center;
		    max-width: 1200px;
		    width: 90%;
		    animation: slideIn 0.3s ease-out;
		}

		@keyframes slideIn {
		    from {
		        transform: translateY(-30px);
		        opacity: 0;
		    }

		    to {
		        transform: translateY(0);
		        opacity: 1;
		    }
		}

		.circular-loader {
		    width: 80px;
		    height: 80px;
		    border: 6px solid #f3f3f3;
		    border-top: 6px solid #3498db;
		    border-radius: 50%;
		    animation: spin 1s linear infinite;
		    margin: 0 auto 20px;
		}

		@keyframes spin {
		    0% {
		        transform: rotate(0deg);
		    }

		    100% {
		        transform: rotate(360deg);
		    }
		}

		.loader-text {
		    font-size: 18px;
		    font-weight: 600;
		    color: #333;
		    margin-bottom: 10px;
		}

		.loader-subtext {
		    font-size: 14px;
		    color: #666;
		    margin-bottom: 20px;
		}

		.loader-progress {
		    width: 100%;
		    height: 8px;
		    background: #f0f0f0;
		    border-radius: 4px;
		    overflow: hidden;
		    margin-bottom: 15px;
		}

		.loader-progress-bar {
		    height: 100%;
		    background: linear-gradient(90deg, #3498db, #2ecc71);
		    border-radius: 4px;
		    transition: width 0.3s ease;
		    animation: progressGlow 2s ease-in-out infinite alternate;
		}

		@keyframes progressGlow {
		    0% {
		        box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
		    }

		    100% {
		        box-shadow: 0 0 20px rgba(52, 152, 219, 0.8);
		    }
		}

		.loader-percentage {
		    font-size: 16px;
		    font-weight: 600;
		    color: #3498db;
		}

		/* Pulsing dots animation */
		.loading-dots {
		    display: inline-block;
		}

		.loading-dots::after {
		    content: '';
		    animation: dots 1.5s infinite;
		}

		@keyframes dots {

		    0%,
		    20% {
		        content: '';
		    }

		    40% {
		        content: '.';
		    }

		    60% {
		        content: '..';
		    }

		    80%,
		    100% {
		        content: '...';
		    }
		}

		/* Alternative spinner styles */
		.spinner-ring {
		    display: inline-block;
		    position: relative;
		    width: 80px;
		    height: 80px;
		    margin: 0 auto 20px;
		}

		.spinner-ring div {
		    box-sizing: border-box;
		    display: block;
		    position: absolute;
		    width: 64px;
		    height: 64px;
		    margin: 8px;
		    border: 6px solid #3498db;
		    border-radius: 50%;
		    animation: ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
		    border-color: #3498db transparent transparent transparent;
		}

		.spinner-ring div:nth-child(1) {
		    animation-delay: -0.45s;
		}

		.spinner-ring div:nth-child(2) {
		    animation-delay: -0.3s;
		}

		.spinner-ring div:nth-child(3) {
		    animation-delay: -0.15s;
		}

		@keyframes ring {
		    0% {
		        transform: rotate(0deg);
		    }

		    100% {
		        transform: rotate(360deg);
		    }
		}

		/* Pulse loader */
		.pulse-loader {
		    width: 80px;
		    height: 80px;
		    margin: 0 auto 20px;
		    position: relative;
		}

		.pulse-loader div {
		    position: absolute;
		    width: 100%;
		    height: 100%;
		    border-radius: 50%;
		    background: #3498db;
		    animation: pulse 1.5s infinite ease-in-out;
		}

		.pulse-loader div:nth-child(2) {
		    animation-delay: -0.5s;
		}

		@keyframes pulse {

		    0%,
		    100% {
		        transform: scale(0);
		        opacity: 1;
		    }

		    50% {
		        transform: scale(1);
		        opacity: 0.7;
		    }
		}

		/* Responsive design */
		@media (max-width: 768px) {
		    .loader-container {
		        padding: 30px 20px;
		        margin: 20px;
		    }

		    .circular-loader,
		    .spinner-ring,
		    .pulse-loader {
		        width: 60px;
		        height: 60px;
		    }

		    .spinner-ring div {
		        width: 48px;
		        height: 48px;
		        margin: 6px;
		        border-width: 4px;
		    }

		    .loader-text {
		        font-size: 16px;
		    }

		    .loader-subtext {
		        font-size: 12px;
		    }
		}
		
		
        main#main {
            padding-left: 15px;
            padding-right: 15px;
        }
        @media(max-width:767px){
        .tool-main-div {
            padding: 15px;
        }
            }
            
        .output-container {
            padding-top: 15px;
        }
        
        @media(max-width:767px){
            .output-container{
                margin-top:20px;
            }
        }
        
        @media(max-width:381px){
            .func-buttons {
            flex-direction: column;
            gap: 8px;
            align-items: center;
        }
        button#acceptAll {
            margin-left: 0 !important;
        }
        }
        
        
        
/* ------------------------   NEW  ----------------------------  */

#mainleftRightparent {
    display: flex;
}
#leftmainContent {
    width: 100%;
}

div#rightMainOutput {
    padding: 20px;
    background: #fff;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
    max-height: 500px;
    min-height: 235px;
    overflow: auto;
    border-radius: 10px;
}

span.correct-number {
    font-size: 20px;
    color: #28a745;
    font-weight: 700;
}
span.correct-label {
    font-size: 14px;
}
.stat-item.stat-warning .correct-number {
    color: orange;
}


@media(min-width:1200px){
div#content {
    max-width: 1350px;
}
.stats-container {
    justify-content: space-between;
        }
    }

@media(max-width:1199px){

div#mainleftRightparent {
    flex-direction: column;
}
div#rightMainOutput {
    width: 100% !important;
    min-height: unset;
    max-height: unset;
}
.output-container {
    margin-top: 10px;
}
div#rightMainOutput {
    padding: 10px;
}
div#grammarResults {
    line-height: 35px;
}
    
}

@media(max-width:767px){
textarea#grammarText {
    min-height: 300px !important;
}
main#main{
    padding-bottom:40px;
}
    }
    
div#grammarResults {
    line-height: 35px;
}

.error {
    display: none;
    background-color: rgb(255, 225, 225);
    color: rgba(255, 0, 0, 1);
    border: 1px solid rgb(225, 153, 153, 0.05);
    padding: 1%;
}

#word_message.warning {
    background-color:#d977061f;
    padding:.5%;
    color: #d97706;
}
#word_message.info {
    background-color:#2563eb40;
    padding:.5%;
    color: #2563eb;
}
#word_message.success {
    background-color:#16a34a45;
    padding:.5%;
    color: #16a34a;
}
div#word_count_wrapper {
    padding:0.5%;
}
.wordspan {
    padding:.5%;
}
div#grammer_error {
    text-align:center;
}
div#word_message {
    text-align:center;   
}
.message-box {
    padding: 10px 15px;
    margin-top: 10px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.message-box.success {
    background-color: #d1fae5;
    color: #065f46;
}
.message-box.error {
    background-color: #fee2e2;
    color: #991b1b;
}