/* 文本大小写转换器工具样式 */
.text-case-converter-tool {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* 文本编辑器样式 */
.text-textarea {
    border: none;
    border-radius: 0;
    resize: none;
    font-size: 14px;
    line-height: 1.6;
    background: #fafafa;
}

.text-textarea:focus {
    box-shadow: none;
    background: #ffffff;
}

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

.text-status-bar {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #6c757d;
}

/* 工具栏样式 */
.text-toolbar {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.text-toolbar .btn {
    min-width: 80px;
}

.text-toolbar-divider {
    width: 1px;
    height: 24px;
    background: #dee2e6;
    margin: 0 0.5rem;
}

/* 转换网格样式 */
.conversion-grid {
    display: grid;
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.conversion-item {
    margin-bottom: 0;
}

.conversion-item .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.conversion-item .input-group {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.conversion-item .form-control {
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    border-right: none;
}

.conversion-item .btn {
    border-left: none;
    background: #f8f9fa;
    border-color: #ced4da;
}

.conversion-item .btn:hover {
    background: #e9ecef;
}

/* 高级转换选项样式 */
.conversion-options {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.conversion-options h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
}

.conversion-options .form-check {
    margin-bottom: 0.5rem;
}

.conversion-options .form-check-label {
    font-size: 0.9rem;
    color: #6c757d;
}

/* 批量操作样式 */
.batch-operations {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
    margin-top: 1rem;
}

.batch-operations h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

/* 统计信息样式 */
.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.stat-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #495057;
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* 标签页样式 */
.nav-pills .nav-link {
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-pills .nav-link.active {
    background-color: #0d6efd;
}

.nav-pills .nav-link:hover:not(.active) {
    background-color: #e9ecef;
    color: #0d6efd;
}

/* 转换结果动画 */
.conversion-item .form-control {
    transition: all 0.3s ease;
}

.conversion-item .form-control:focus {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.25);
}

/* 复制成功动画 */
.copy-success {
    animation: copySuccess 0.5s ease;
}

@keyframes copySuccess {
    0% {
        background-color: #ffffff;
    }
    50% {
        background-color: #d4edda;
    }
    100% {
        background-color: #ffffff;
    }
}

/* 滚动条样式 */
.conversion-grid::-webkit-scrollbar {
    width: 6px;
}

.conversion-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.conversion-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.conversion-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 对比模态框样式 */
.comparison-modal .modal-content {
    border-radius: 12px;
}

.comparison-table {
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
}

.comparison-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.comparison-table td {
    vertical-align: top;
    padding: 0.75rem;
}

.comparison-original {
    background: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.comparison-converted {
    background: #e8f5e8;
    border-left: 3px solid #4caf50;
}

/* 加载动画 */
.converting {
    position: relative;
    overflow: hidden;
}

.converting::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(13, 110, 253, 0.3), transparent);
    animation: converting 1.5s infinite;
}

@keyframes converting {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    margin: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .text-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .text-toolbar-divider {
        width: auto;
        height: 1px;
        margin: 0.5rem 0;
    }

    .conversion-grid {
        max-height: 400px;
    }

    .nav-pills {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-pills .nav-link {
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .text-textarea {
        font-size: 13px;
    }

    .conversion-grid {
        max-height: 300px;
        gap: 0.75rem;
    }

    .conversion-item .form-control {
        font-size: 13px;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .batch-operations .d-flex {
        flex-direction: column;
    }

    .batch-operations .btn {
        margin-bottom: 0.5rem;
    }
}

/* 深色主题支持 */
@media (prefers-color-scheme: dark) {
    .text-case-converter-tool {
        background: #1a1a1a;
        color: #e9ecef;
    }

    .text-textarea {
        background: #2d3748;
        color: #e9ecef;
    }

    .text-status-bar {
        background: #2d3748;
        color: #a0aec0;
    }

    .text-toolbar {
        background: #2d3748;
        border-color: #4a5568;
    }

    .conversion-options {
        background: #2d3748;
        border-color: #4a5568;
    }

    .stat-item {
        background: #2d3748;
        border-color: #4a5568;
    }

    .stat-item:hover {
        background: #4a5568;
    }

    .nav-pills .nav-link:hover:not(.active) {
        background: #4a5568;
        color: #63b3ed;
    }

    .conversion-item .btn {
        background: #4a5568;
        border-color: #4a5568;
        color: #e9ecef;
    }

    .conversion-item .btn:hover {
        background: #718096;
    }

    .empty-state {
        color: #a0aec0;
    }

    .empty-state i {
        color: #4a5568;
    }
}

/* 打印样式 */
@media print {
    .text-toolbar,
    .batch-operations,
    .nav-pills,
    .card-header,
    footer {
        display: none !important;
    }

    .conversion-grid {
        max-height: none;
        overflow: visible;
    }

    .conversion-item .form-control {
        border: 1px solid #000;
        background: #fff;
        color: #000;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .conversion-item .form-control {
        border: 2px solid #000;
    }

    .conversion-item .btn {
        border: 2px solid #000;
        font-weight: 600;
    }

    .nav-pills .nav-link {
        border: 2px solid transparent;
    }

    .nav-pills .nav-link.active {
        border-color: #000;
    }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}