.text-pro-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
    background: #ffffff;
    border: 3px solid #d1d5db; /* Permanent gray border */
    border-radius: 20px;
    position: relative;
    transition: border 0.3s ease, background 0.3s ease;
}

/* Hover effect with gradient border */
.text-pro-container:hover {
    border: 3px solid transparent;
    background: 
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899) border-box;
}



/* Header Styles */
.text-pro-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.text-pro-title {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.text-pro-description {
    color: #6b7280;
    font-size: 1rem;
}

/* Main Content Layout */
.text-pro-main-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

.text-pro-left-panel {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    overflow: hidden;
    max-width: 100%;
}

.text-pro-right-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Toolbar Styles */
.text-pro-toolbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.text-pro-toolbar-btn {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.text-pro-toolbar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.text-pro-toolbar-btn.text-pro-active {
    background: linear-gradient(135deg, #1d4ed8, #7c3aed);
}

/* Input Section */
.text-pro-input-section {
    margin-bottom: 1.5rem;
}

.text-pro-textarea-container {
    position: relative;
    margin-bottom: 1rem;
}

#text-pro-inputText {
    width: 100%;
    height: 300px;
    max-height: 300px;
    padding: 1.2rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #1f2937;
    background: #f9fafb;
    resize: none;
    font-family: inherit;
    line-height: 1.6;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
}

#text-pro-inputText:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

#text-pro-inputText:empty:before {
    content: attr(placeholder);
    color: #9ca3af;
    font-style: italic;
    pointer-events: none;
    position: absolute;
}

.text-pro-mini-stats {
    text-align: center;
    padding: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    font-size: 0.75rem;
    color: #3b82f6;
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
}

.text-pro-icon {
    color: #3b82f6;
}

/* File Input Styles */
.text-pro-file-input {
    display: none;
}

.text-pro-file-label {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.text-pro-file-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Find & Replace Section */
.text-pro-find-replace-section {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    border: 2px solid #e5e7eb;
}

.text-pro-find-replace-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.text-pro-find-replace-inputs input {
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.85rem;
    max-width: 100%;
}

.text-pro-find-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.text-pro-find-option {
    font-size: 0.8rem;
}

/* Encoder/Decoder Section */
.text-pro-encoder-section {
    margin-bottom: 1.5rem;
}

.text-pro-encoder-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.text-pro-encoder-tab {
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.text-pro-encoder-tab.text-pro-active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.text-pro-encoder-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#text-pro-encoderOutput {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #1f2937;
    background: #f3f4f6;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
    box-sizing: border-box;
}

#text-pro-encoderOutput:focus {
    outline: none;
    border-color: #10b981;
    background: white;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Compare Section */
.text-pro-compare-section {
    margin-bottom: 1.5rem;
}

.text-pro-compare-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.text-pro-compare-container textarea {
    width: 100%;
    height: 150px;
    max-height: 150px;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #1f2937;
    background: #f9fafb;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
    box-sizing: border-box;
}

.text-pro-compare-container textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.text-pro-compare-result {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.2rem;
    margin-top: 1rem;
}

.text-pro-compare-output {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    word-break: break-all;
    white-space: pre-wrap;
    line-height: 1.5;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1rem;
    background: white;
}

.text-pro-diff-added {
    background: rgba(34, 197, 94, 0.2);
    padding: 0 0.25rem;
    border-radius: 4px;
    margin: 0 1px;
    display: inline;
    word-break: break-word;
}

.text-pro-diff-removed {
    background: rgba(239, 68, 68, 0.2);
    text-decoration: line-through;
    padding: 0 0.25rem;
    border-radius: 4px;
    margin: 0 1px;
    display: inline;
    word-break: break-word;
}

.text-pro-diff-common {
    background: rgba(156, 163, 175, 0.1);
    padding: 0 0.25rem;
    border-radius: 4px;
    margin: 0 1px;
    display: inline;
    word-break: break-word;
}

/* Metrics Grid */
.text-pro-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.text-pro-metric-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.text-pro-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

.text-pro-metric-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.15);
    transform: translateY(-3px);
}

.text-pro-metric-card h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.text-pro-metric-card p {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.2rem;
}

.text-pro-metric-card .text-pro-sub-text {
    font-size: 0.7rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Side Cards */
.text-pro-side-card {
    background: white;
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.text-pro-side-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.text-pro-side-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Progress Bars */
.text-pro-progress-container {
    margin-bottom: 0.8rem;
}

.text-pro-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.text-pro-progress-label span {
    font-size: 0.8rem;
    font-weight: 500;
}

.text-pro-progress-label .text-pro-percentage {
    color: #3b82f6;
    font-weight: 600;
}

.text-pro-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.text-pro-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.6s ease;
    border-radius: 4px;
}

/* Word Goal Input */
.text-pro-word-goal-input {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* Insights Container */
.text-pro-insights-container {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.text-pro-insight {
    margin-bottom: 0.4rem;
}

/* Analysis Section */
.text-pro-analysis-section {
    margin-bottom: 1.5rem;
}

.text-pro-analysis-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.text-pro-tab-btn {
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.text-pro-tab-btn:hover {
    background: #e5e7eb;
}

.text-pro-tab-btn.text-pro-active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.text-pro-tab-content {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.2rem;
    border: 2px solid #e5e7eb;
}

.text-pro-tab-pane {
    display: none;
}

.text-pro-tab-pane.text-pro-active {
    display: block;
}

/* Stats Row */
.text-pro-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.text-pro-stat-item {
    text-align: center;
    padding: 0.6rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.text-pro-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #3b82f6;
}

.text-pro-stat-label {
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Keyword Analysis */
.text-pro-keyword-density-options {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.text-pro-keyword-density-options label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
}

.text-pro-word-count-selector {
    display: flex;
    gap: 0.25rem;
}

.text-pro-word-count-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.text-pro-word-count-btn:hover {
    background: #e5e7eb;
}

.text-pro-word-count-btn.text-pro-active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.text-pro-keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
    max-width: 100%;
}

.text-pro-keyword-tag {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chart Container */
.text-pro-chart-container {
    position: relative;
    height: 250px;
    margin-top: 1rem;
}

/* Highlighted Text */
mark.text-pro-highlight {
    background-color: yellow;
    color: black;
    padding: 0;
    margin: 0;
}

/* Hidden Class */
.text-pro-hidden {
    display: none !important;
}

/* Animations */
.text-pro-fade-in {
    animation: text-pro-fadeIn 0.5s ease-in;
}

@keyframes text-pro-fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-pro-loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: text-pro-spin 1s linear infinite;
    display: inline-block;
    margin-left: 0.5rem;
}

@keyframes text-pro-spin {
    to { transform: rotate(360deg); }
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .text-pro-main-content {
        display: block;
    }
    .text-pro-right-panel {
        margin-top: 1.5rem;
    }
}

@media (max-width: 768px) {
.text-pro-container {
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 40px 24px !important;
  border: 3px solid transparent !important;
  border-radius: 20px !important;
  background-image: 
    linear-gradient(#ffffff, #ffffff), 
    linear-gradient(90deg, #d1d5db, #d1d5db) !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
  z-index: 1 !important;
}

/* 🔥 Hover pe gradient border dikhao */
.text-pro-container:hover {
  background-image: 
    linear-gradient(#ffffff, #ffffff), 
    linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899) !important;
}


    .text-pro-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .text-pro-header h2 {
        font-size: 1.6rem;
    }

    .text-pro-description {
        font-size: 0.9rem;
    }

    .text-pro-left-panel {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .text-pro-toolbar {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 0.4rem;
        margin-bottom: 1rem;
    }

    .text-pro-toolbar-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.75rem;
    }

    #text-pro-inputText {
        min-height: 140px;
        padding: 1rem;
        font-size: 0.9rem;
    }

    .text-pro-metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.6rem;
        margin-bottom: 1rem;
    }

    .text-pro-metric-card {
        padding: 0.8rem;
    }

    .text-pro-metric-card p {
        font-size: 1.3rem;
    }

    .text-pro-side-card {
        padding: 1rem;
    }

    .text-pro-compare-container {
        grid-template-columns: 1fr;
    }

    .text-pro-compare-container textarea {
        min-height: 100px;
    }

    .text-pro-analysis-tabs {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.3rem;
    }

    .text-pro-tab-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.75rem;
    }

    .text-pro-find-replace-inputs {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .text-pro-find-replace-inputs button {
        width: 100%;
    }

    .text-pro-keyword-tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .text-pro-container {
        padding: 0.4rem;
    }

    .text-pro-header h2 {
        font-size: 1.4rem;
    }

    .text-pro-toolbar {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.3rem;
    }

    .text-pro-toolbar-btn {
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
    }

    .text-pro-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }

    .text-pro-metric-card {
        padding: 0.6rem;
    }

    .text-pro-metric-card h3 {
        font-size: 0.7rem;
    }

    .text-pro-metric-card p {
        font-size: 1.1rem;
    }

    #text-pro-inputText {
        min-height: 120px;
        padding: 0.8rem;
        font-size: 0.85rem;
    }

    .text-pro-tab-content {
        padding: 1rem;
    }

    .text-pro-keyword-tag {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
}