/* Additional styles for Chinese Converter */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    background-color: #f8f9fa;
}

.converter-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom: 20px;
}

h1 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 30px;
}

.nav-tabs {
    border-bottom: 2px solid #e9ecef;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
    padding: 12px 24px;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: #007bff;
}

.nav-tabs .nav-link.active {
    background-color: transparent;
    border-color: transparent transparent #007bff transparent;
    border-bottom: 3px solid #007bff;
    color: #007bff;
    font-weight: 600;
}

.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.card-body {
    padding: 30px;
}

.card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 20px 30px;
    border-radius: 0 0 10px 10px;
}

#hanzi {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.6;
    padding: 15px;
    transition: border-color 0.3s ease;
    font-family: 'Microsoft YaHei', '微软雅黑', 'SimSun', '宋体', Arial, sans-serif;
}

#hanzi:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-action {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
}

.btn-action:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
    color: white;
}

.btn-action:active {
    transform: translateY(0);
}

.character-counter {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}



.file-drop-area {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px dashed #dee2e6;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.file-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.file-drop-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 123, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.file-drop-area:hover::before {
    left: 100%;
}

.file-drop-area:hover {
    border-color: #007bff;
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.2);
}

.file-drop-area.dragover {
    border-color: #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: scale(1.02);
}

.choose-file-button {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    display: inline-block;
    margin-right: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
    user-select: none;
    z-index: 10;
    position: relative;
}

.choose-file-button:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

.file-message {
    color: #6c757d;
    font-size: 16px;
    font-weight: 400;
}

.form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
}

.form-check-label {
    color: #495057;
    font-weight: 500;
}

.loading-overlay {
    backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.6);
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.5);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .converter-container {
        margin: 10px;
        padding: 10px;
    }

    .card-body {
        padding: 20px;
    }

    .card-footer {
        padding: 15px 20px;
        flex-direction: column;
        align-items: stretch;
    }

    .card-footer>div {
        margin-bottom: 15px;
    }

    .btn-action {
        width: 100%;
        margin: 5px 0;
    }

    .file-drop-area {
        padding: 30px 15px;
    }

    .choose-file-button {
        display: block;
        margin: 0 0 10px 0;
        text-align: center;
    }
}

/* Noty theme customization */
.noty_theme__mint.noty_bar {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.noty_theme__mint.noty_type__success {
    background-color: #28a745;
    border-color: #28a745;
}

.noty_theme__mint.noty_type__warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.noty_theme__mint.noty_type__error {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* Tooltip customization */
.tooltip {
    font-size: 14px;
}

.tooltip-inner {
    background-color: #2c3e50;
    border-radius: 6px;
    padding: 8px 12px;
}

/* Result area styling */
.result-text-content {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-family: 'Microsoft YaHei', '微软雅黑', 'SimSun', '宋体', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    padding: 20px;
    min-height: 150px;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #2c3e50;
    animation: fadeInUp 0.5s ease;
}

/* Saved input area styling */
.saved-input-content {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffeaa7;
    border-radius: 10px;
    font-family: 'Microsoft YaHei', '微软雅黑', 'SimSun', '宋体', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    padding: 20px;
    min-height: 120px;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #856404;
    font-style: italic;
}

.saved-input-content:not(:empty) {
    font-style: normal;
    color: #2c3e50;
}

/* Conversion history styling */
.conversion-history-container {
    margin-top: 20px;
}

.conversion-group {
    border: 2px solid #e9ecef;
    border-radius: 15px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: slideInUp 0.5s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.conversion-group-header {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 13px 13px 0 0;
    font-weight: 600;
    display: flex;
    justify-content: between;
    align-items: center;
}

.conversion-group-content {
    padding: 0;
}

.input-text-section {
    border-bottom: 1px solid #e9ecef;
}

.input-text-section .card-header {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-bottom: 1px solid #ffeaa7;
    color: #856404;
}

.result-text-section .card-header {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-bottom: 1px solid #bee5eb;
    color: #0c5460;
}

.conversion-group .card {
    border: none;
    border-radius: 0;
    margin-bottom: 0;
}

.conversion-group .card:last-child {
    border-radius: 0 0 13px 13px;
}

.conversion-group .card-header {
    border-radius: 0;
    font-weight: 500;
}

.conversion-group .card-body {
    padding: 20px;
}

.conversion-timestamp {
    font-size: 0.85em;
    opacity: 0.8;
    margin-left: auto;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Copy button styling */
#copyResult,
#copyToInput {
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#copyResult:hover,
#copyToInput:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

/* Tab content styling */
.tab-content {
    background-color: white;
    border-radius: 0 0 10px 10px;
    padding: 0;
}

.tab-pane {
    padding: 30px;
}

/* Instructions styling */
.container p {
    color: #6c757d;
    line-height: 1.6;
    font-size: 15px;
}

.container p strong {
    color: #2c3e50;
    font-weight: 600;
}
/* Im
age Upload Enhancements */
#cnimg .file-drop-area {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#cnimg .file-drop-area .fa-cloud-upload-alt {
    opacity: 0.6;
    transition: all 0.3s ease;
}

#cnimg .file-drop-area:hover .fa-cloud-upload-alt {
    opacity: 1;
    transform: translateY(-5px);
}

#image-preview-area {
    animation: fadeIn 0.3s ease-in;
}

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

#image-preview {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

#image-preview:hover {
    transform: scale(1.02);
}

/* OCR Progress Styling */
.ocr-progress {
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9em;
    display: inline-block;
}

/* Enhanced Alert Styling */
.alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
    border: 1px solid #bee5eb;
    border-radius: 10px;
}

.alert-info h6 {
    color: #0c5460;
    font-weight: 600;
}

.alert-info ol {
    color: #0c5460;
}

.alert-info ol li {
    margin-bottom: 5px;
}