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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #4A9B8E 0%, #5AAE9A 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

h1 {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 2.5em;
    margin: 0;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #4A9B8E 0%, #5AAE9A 100%);
    color: white;
}

.header h1 {
    padding: 0;
    background: none;
    margin: 0;
    flex-grow: 1;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.language-selector {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.lang-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    font-weight: 600;
}

.settings-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.upload-section {
    padding: 30px;
    background: #f8f9fa;
}

/* Feedback Type Selector */
.feedback-type-selector {
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.feedback-type-selector h3 {
    color: #4A9B8E;
    margin-bottom: 15px;
    font-size: 1.2em;
    text-align: center;
}

.feedback-type-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.feedback-type-btn {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    color: #495057;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    justify-content: center;
}

.feedback-type-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 155, 142, 0.2);
    border-color: #4A9B8E;
}

.feedback-type-btn.active {
    background: linear-gradient(135deg, #4A9B8E 0%, #5AAE9A 100%);
    color: white;
    border-color: #4A9B8E;
    box-shadow: 0 4px 15px rgba(74, 155, 142, 0.3);
}

/* General Date Section */
.general-date-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #e8f5e8;
    border-radius: 10px;
    border-left: 5px solid #4A9B8E;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.general-date-section h4 {
    color: #2d5f52;
    margin-bottom: 15px;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.general-date-section h4::before {
    content: "📅";
    font-size: 1.2em;
}

.general-date-section .form-group {
    max-width: 300px;
}

.general-date-section input[type="date"] {
    padding: 10px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.2s ease;
    background: white;
}

.general-date-section input[type="date"]:focus {
    outline: none;
    border-color: #4A9B8E;
    box-shadow: 0 0 0 3px rgba(74, 155, 142, 0.1);
}

/* Shop Information Section */
.shop-info-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #fff3cd;
    border-radius: 10px;
    border-left: 5px solid #ffc107;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.shop-info-section h4 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-info-section h4::before {
    content: "🏪";
    font-size: 1.2em;
}

.shop-form {
    display: grid;
    gap: 15px;
    grid-template-columns: 1fr 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
}

.form-group input {
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #4A9B8E;
    box-shadow: 0 0 0 3px rgba(74, 155, 142, 0.1);
}

.form-group input[type="datetime-local"] {
    color: #495057;
}

/* Error message styling */
.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-message::before {
    content: "⚠️";
    font-size: 1.1em;
}

.error-message.show {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shop context in results */
.shop-context {
    margin-top: 15px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.shop-context h5 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 1em;
    font-weight: 600;
}

.shop-context p {
    margin: 5px 0;
    color: #495057;
    font-size: 0.9em;
}

.input-mode-selector {
    display: flex;
    margin-bottom: 30px;
    background: #E8F5F3;
    border-radius: 10px;
    padding: 5px;
    gap: 5px;
}

.mode-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #4A9B8E;
}

.mode-btn.active {
    background: linear-gradient(135deg, #4A9B8E 0%, #5AAE9A 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(74, 155, 142, 0.3);
}

.mode-btn:hover:not(.active) {
    background: rgba(74, 155, 142, 0.1);
    color: #3A7B6E;
}

/* Input Method Selector */
.input-method-selector {
    margin-bottom: 30px;
}

.input-method-selector h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.2em;
    text-align: center;
}

.input-method-buttons {
    display: flex;
    gap: 10px;
    background: rgba(74, 155, 142, 0.1);
    border-radius: 12px;
    padding: 8px;
}

.input-method-btn {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #4A9B8E;
    text-align: center;
}

.input-method-btn.active {
    background: linear-gradient(135deg, #4A9B8E 0%, #5AAE9A 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(74, 155, 142, 0.3);
}

.input-method-btn:hover:not(.active) {
    background: rgba(74, 155, 142, 0.15);
    color: #3A7B6E;
}

/* Input Method Content */
.input-method-content {
    margin-bottom: 20px;
}

.text-input-section h5,
.excel-upload-info h4,
.handwritten-upload-info h4 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.excel-upload-info,
.handwritten-upload-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #4A9B8E;
}

.excel-format-info,
.handwritten-format-info {
    margin-top: 15px;
}

.excel-format-info h5,
.handwritten-format-info h5 {
    color: #6c757d;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.excel-format-info ul,
.handwritten-format-info ul {
    margin-left: 20px;
    color: #6c757d;
}

.excel-format-info li,
.handwritten-format-info li {
    margin-bottom: 4px;
    font-size: 0.9em;
}

.processing-rules {
    margin-top: 15px;
    padding: 15px;
    background: #e8f4fd;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.processing-rules h5 {
    color: #0056b3;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.rules-list {
    margin-left: 20px;
    color: #495057;
}

.rules-list li {
    margin-bottom: 6px;
    font-size: 0.85em;
    line-height: 1.4;
}

.sample-download {
    margin-top: 15px;
    text-align: center;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Excel Batch Results Styling */
.excel-batch-results {
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.processing-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
}

.summary-icon {
    font-size: 2.5em;
    margin-right: 15px;
}

.summary-info {
    flex: 1;
}

.summary-label {
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #495057;
}

.average-sentiment-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.sentiment-score-large {
    font-size: 3em;
    font-weight: bold;
    margin: 15px 0;
}

.sentiment-distribution {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.distribution-stats {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-top: 15px;
}

.stat-item {
    text-align: center;
    flex: 1;
    padding: 15px;
    border-radius: 8px;
}

.stat-item.positive {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.stat-item.neutral {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
}

.stat-item.negative {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
}

.stat-emoji {
    font-size: 2em;
    display: block;
    margin-bottom: 8px;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #495057;
}

.processing-details {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.processing-details ul {
    list-style: none;
    padding: 0;
}

.processing-details li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
}

.processing-details li:last-child {
    border-bottom: none;
}

.action-buttons {
    text-align: center;
    margin-top: 30px;
}

.btn-primary {
    background: linear-gradient(135deg, #4A9B8E 0%, #5AAE9A 100%);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3A7B6E 0%, #4A9B8E 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 155, 142, 0.3);
}

/* Handwritten Form Results Styling */
.handwritten-form-results {
    padding: 30px;
    background: linear-gradient(135deg, #f1f8ff 0%, #e6f3ff 100%);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.extracted-feedback {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.feedback-list {
    display: grid;
    gap: 15px;
    margin-top: 15px;
}

.feedback-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #4A9B8E;
    transition: all 0.2s ease;
}

.feedback-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

.feedback-index {
    font-weight: bold;
    color: #495057;
    font-size: 0.9em;
}

.sentiment-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.sentiment-badge.sentiment-positive {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.sentiment-badge.sentiment-neutral {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.sentiment-badge.sentiment-negative {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.feedback-content {
    color: #495057;
    line-height: 1.5;
}

.feedback-content div {
    margin-bottom: 5px;
}

.feedback-content div:last-child {
    margin-bottom: 0;
}

.processing-errors {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.processing-errors h4 {
    color: #c53030;
    margin-bottom: 15px;
}

.error-list {
    display: grid;
    gap: 8px;
}

.error-item {
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    border-left: 3px solid #f56565;
    color: #742a2a;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.file-input-section {
    margin-bottom: 20px;
}

.excel-file-label,
.handwritten-file-label {
    display: block;
    padding: 20px;
    border: 2px dashed #4A9B8E;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.excel-file-label:hover,
.handwritten-file-label:hover {
    border-color: #3A7B6E;
    background: #e9ecef;
}

.input-container {
    margin-bottom: 30px;
}

.file-input-container {
    position: relative;
}

#fileInput {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-label {
    display: block;
    padding: 40px 20px;
    border: 3px dashed #4A9B8E;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #F7FDFB;
}

.file-label:hover {
    border-color: #3A7B6E;
    background: #E8F5F3;
    transform: translateY(-2px);
}

.file-label.dragover {
    border-color: #3A7B6E;
    background: #E0F2E8;
    transform: scale(1.02);
}

.file-text {
    display: block;
    font-size: 1.2em;
    color: #4A9B8E;
    margin-bottom: 10px;
}

.file-name {
    display: block;
    font-size: 1em;
    color: #333;
    font-weight: bold;
}

.text-input-container {
    position: relative;
}

#textInput {
    width: 100%;
    min-height: 200px;
    padding: 20px;
    border: 3px dashed #4A9B8E;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1em;
    line-height: 1.6;
    resize: vertical;
    background: #F7FDFB;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

#textInput:focus {
    border-color: #3A7B6E;
    background: #E8F5F3;
    box-shadow: 0 0 0 4px rgba(74, 155, 142, 0.1);
}

#textInput::placeholder {
    color: #4A9B8E;
    opacity: 0.8;
}

.text-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

.char-count {
    color: #4A9B8E;
    font-weight: 500;
}

.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sentiment-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #7CB342 0%, #8BC34A 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sentiment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 179, 66, 0.3);
}

.sentiment-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.result-section {
    padding: 40px;
    background: #F7FDFB;
    border-top: 1px solid #C7E9E2;
}

.result-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.result-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #4A9B8E;
    font-size: 1.1em;
    line-height: 1.6;
}

.loading {
    text-align: center;
    color: #4A9B8E;
    font-style: italic;
}

.error {
    color: #e74c3c;
    background: #ffebee;
    border-left-color: #e74c3c;
}

.success {
    color: #7CB342;
    background: #F1F8E9;
    border-left-color: #7CB342;
}

/* Sentiment Analysis Results Styles */
.sentiment-results {
    max-width: none;
}

.sentiment-score-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin-bottom: 25px;
    border: 2px solid #e1e8ed;
}

.sentiment-score {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 10px;
}

.sentiment-label {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    text-transform: capitalize;
}

.confidence {
    font-size: 1.1em;
    color: #666;
    font-weight: 500;
}

.analysis-details {
    display: grid;
    gap: 20px;
}

.detail-section {
    background: #fafbfc;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #4A9B8E;
}

.detail-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section p {
    margin: 8px 0;
    line-height: 1.6;
}

.keyword-match {
    background: white;
    padding: 10px;
    border-radius: 6px;
    margin: 8px 0;
    border: 1px solid #e1e8ed;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.keyword-match strong {
    color: #4A9B8E;
    min-width: 120px;
}

.matched-terms {
    color: #666;
    font-style: italic;
    flex-grow: 1;
}

.match-count {
    background: #4A9B8E;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.reasoning {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid #7CB342;
    font-style: italic;
    line-height: 1.6;
    color: #555;
}

.metadata {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e1e8ed;
    color: #888;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .sentiment-score-card {
        padding: 20px;
    }
    
    .sentiment-score {
        font-size: 2em;
    }
    
    .keyword-match {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .keyword-match strong {
        min-width: auto;
    }
}

/* Modal Styles */
.modal-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: 1000;
    backdrop-filter: blur(5px);
}

.modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #4A9B8E 0%, #5AAE9A 100%);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px 30px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Language Section in Modal */
.language-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.language-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.language-selector-modal {
    display: flex;
    gap: 10px;
    background: #f8f9fa;
    padding: 5px;
    border-radius: 25px;
    width: fit-content;
}

.language-selector-modal .lang-btn {
    background: transparent;
    border: none;
    color: #495057;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.language-selector-modal .lang-btn:hover {
    background: rgba(74, 155, 142, 0.1);
    color: #4A9B8E;
}

.language-selector-modal .lang-btn.active {
    background: #4A9B8E;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(74, 155, 142, 0.3);
}

.keywords-section h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.info-text {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.9em;
    line-height: 1.5;
}

.import-export-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: #E8F5F3;
    border-radius: 8px;
    border: 1px solid #C7E9E2;
    flex-wrap: wrap;
    align-items: center;
}

.btn-export, .btn-import {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-export {
    background: #4A9B8E;
    color: white;
}

.btn-export:hover {
    background: #3A7B6E;
    transform: translateY(-1px);
}

.btn-import {
    background: #7CB342;
    color: white;
}

.btn-import:hover {
    background: #689F38;
    transform: translateY(-1px);
}

.keyword-table-container {
    border: 1px solid #C7E9E2;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.keyword-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    table-layout: fixed;
}

.keyword-table th {
    background: linear-gradient(135deg, #4A9B8E 0%, #5AAE9A 100%);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    border: none;
}

.keyword-table th:first-child {
    width: 25%;
}

.keyword-table th:nth-child(2) {
    width: 40%;
}

.keyword-table th:nth-child(3) {
    width: 35%;
}

.keyword-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #E8F5F3;
    vertical-align: middle;
    border: none;
    word-wrap: break-word;
}

.keyword-table tbody tr {
    border-bottom: 1px solid #E8F5F3;
}

.keyword-table tbody tr:hover {
    background: #F7FDFB;
}

.keyword-table tbody tr:last-child {
    border-bottom: none;
}

.keyword-table tbody tr:last-child td {
    border-bottom: none;
}

/* Category Badge Styling */
.category-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-right: 8px;
}

/* Keyword Match Display */
.keyword-match {
    margin-bottom: 8px;
}

.keyword-info {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    gap: 8px;
}

.similarity-score {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.75em;
    font-weight: bold;
}

.match-type {
    background: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.75em;
    text-transform: uppercase;
}

.fuzzy-note {
    font-style: italic;
    color: #666;
    margin-top: 8px;
    font-size: 0.9em;
}

.table-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #E0E6E2;
    border-radius: 6px;
    font-size: 0.95em;
    transition: border-color 0.3s ease;
    font-family: inherit;
    background: white;
    box-sizing: border-box;
}

.table-input:focus {
    outline: none;
    border-color: #4A9B8E;
    box-shadow: 0 0 0 3px rgba(74, 155, 142, 0.1);
}

.table-textarea {
    resize: vertical;
    min-height: 60px;
    max-height: 120px;
    font-family: inherit;
    line-height: 1.4;
}

.table-actions {
    text-align: center;
    vertical-align: middle;
}

.delete-keyword-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.delete-keyword-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

.keyword-list {
    margin-bottom: 20px;
}

.keyword-entry {
    background: #F7FDFB;
    border: 1px solid #C7E9E2;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.keyword-entry:hover {
    border-color: #4A9B8E;
    box-shadow: 0 2px 8px rgba(74, 155, 142, 0.1);
}

.keyword-row {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.input-group {
    flex: 1;
}

.input-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #4A9B8E;
    box-shadow: 0 0 0 3px rgba(74, 155, 142, 0.1);
}

.delete-keyword-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    align-self: flex-end;
}

.delete-keyword-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.add-keyword-btn {
    background: #7CB342;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.add-keyword-btn:hover {
    background: #689F38;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(124, 179, 66, 0.3);
}

.modal-footer {
    padding: 20px 30px;
    background: #F7FDFB;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    border-top: 1px solid #C7E9E2;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #4A9B8E 0%, #5AAE9A 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 155, 142, 0.3);
}

.empty-state {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    background: #F7FDFB;
    border-radius: 8px;
    border: 2px dashed #C7E9E2;
    margin: 20px 0;
}

/* Categorized Feedback Styles */
.categorized-feedback-section {
    margin: 25px 0;
    padding: 20px;
    background: #F7FDFB;
    border-radius: 10px;
    border-left: 5px solid #4A9B8E;
}

.categorized-feedback-section h4 {
    color: #4A9B8E;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.category-summary {
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(74, 155, 142, 0.1);
    border-radius: 5px;
}

.feedback-categories {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feedback-category-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #E0F2E5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feedback-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #F7FDFB 0%, #E8F5F0 100%);
    border-bottom: 1px solid #E0F2E5;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-product { background: #E3F2FD; color: #1565C0; }
.category-service { background: #F3E5F5; color: #7B1FA2; }
.category-staff { background: #E8F5E8; color: #2E7D32; }
.category-location { background: #FFF3E0; color: #EF6C00; }
.category-price { background: #FFEBEE; color: #C62828; }
.category-experience { background: #F1F8E9; color: #558B2F; }
.category-general { background: #F5F5F5; color: #424242; }

.category-sentiment {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1.2em;
}

.feedback-content {
    padding: 20px;
}

.feedback-text {
    font-style: italic;
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
    padding: 15px;
    background: #FAFAFA;
    border-left: 4px solid #4A9B8E;
    border-radius: 5px;
}

.related-products {
    margin-bottom: 15px;
    padding: 10px;
    background: #E8F5F0;
    border-radius: 5px;
    font-size: 0.9em;
}

.related-products strong {
    color: #4A9B8E;
}

.product-category-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #E3F2FD;
    color: #1565C0;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    margin-left: 5px;
}

.fuzzy-match-details {
    margin-top: 15px;
    padding: 12px;
    background: #F8F9FA;
    border-radius: 8px;
    border-left: 4px solid #17A2B8;
}

.fuzzy-match-details strong {
    color: #17A2B8;
    display: block;
    margin-bottom: 8px;
}

.fuzzy-matches {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fuzzy-match-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    font-size: 0.9em;
    flex-wrap: wrap;
}

.detected-text {
    background: #FFF3CD;
    color: #856404;
    padding: 2px 6px;
    border-radius: 4px;
    font-style: italic;
    font-weight: 600;
}

.arrow {
    color: #6C757D;
    font-weight: bold;
}

.matched-keyword {
    background: #D4EDDA;
    color: #155724;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.similarity-badge {
    background: #17A2B8;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: 600;
}

.alias-badge {
    background: #6F42C1;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 600;
}

.category-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    font-size: 0.9em;
}

.category-confidence {
    padding: 4px 8px;
    background: #E8F5F0;
    border-radius: 15px;
    color: #4A9B8E;
    font-weight: 600;
}

.category-label {
    padding: 4px 8px;
    background: #F0F0F0;
    border-radius: 15px;
    color: #666;
    text-transform: capitalize;
}

.category-emotions {
    padding: 4px 8px;
    background: #FFF8E1;
    border-radius: 15px;
    color: #F57C00;
    font-size: 0.85em;
}

/* Responsive design for categorized feedback */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .header-controls {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        align-items: center;
    }
    
    .language-selector {
        order: -1;
    }
    
    .lang-btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }
    
    .category-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .category-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .feedback-content {
        padding: 15px;
    }
    
    .fuzzy-match-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .feedback-type-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .feedback-type-btn {
        min-width: 280px;
        width: 100%;
        max-width: 350px;
    }
    
    .shop-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Categorized Feedback Styles */
.categorized-feedback-section {
    margin: 20px 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.categorized-feedback-section h4 {
    color: #4A9B8E;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.category-summary {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9em;
}

.feedback-categories {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feedback-category-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feedback-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
}

.category-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.category-product { background: #e3f2fd; color: #1976d2; }
.category-service { background: #f3e5f5; color: #7b1fa2; }
.category-staff { background: #e8f5e8; color: #388e3c; }
.category-location { background: #fff3e0; color: #f57c00; }
.category-price { background: #ffebee; color: #d32f2f; }
.category-experience { background: #f1f8e9; color: #689f38; }
.category-general { background: #e0e0e0; color: #424242; }

.category-sentiment {
    font-weight: bold;
    font-size: 1.1em;
}

.feedback-content {
    padding: 15px;
}

.feedback-text {
    font-style: italic;
    margin: 10px 0;
    padding: 10px;
    background: #ffffff;
    border-left: 4px solid #4A9B8E;
    border-radius: 4px;
}

.related-products {
    margin: 10px 0;
    padding: 8px 12px;
    background: #e8f4f1;
    border-radius: 6px;
    font-size: 0.9em;
}

.category-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.85em;
}

.category-confidence,
.category-label,
.category-emotions {
    padding: 4px 8px;
    background: #f5f5f5;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.category-confidence {
    color: #4A9B8E;
    font-weight: bold;
}

.category-label {
    color: #666;
    text-transform: capitalize;
}

.category-emotions {
    color: #7b1fa2;
}

/* Image Preview Styles */
.image-preview-container {
    margin-top: 20px;
    padding: 15px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.image-preview-container h5 {
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.image-preview-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.preview-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    object-fit: contain;
    border: 2px solid #e0e0e0;
}

.preview-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
}

.preview-filename {
    font-weight: 600;
    color: #333;
    text-align: center;
    word-break: break-word;
}

.preview-filesize {
    color: #888;
    font-style: italic;
}

.clear-preview-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ff4444;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background 0.2s ease;
}

.clear-preview-btn:hover {
    background: #ff6666;
}

/* For PDF preview - show placeholder */
.pdf-preview-placeholder {
    width: 200px;
    height: 250px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    text-align: center;
}

.pdf-preview-placeholder::before {
    content: "📄";
    font-size: 48px;
    margin-bottom: 10px;
}