
.text-compressor-container {
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    border: none;
    border-radius: 12px;
}

.card-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 12px 12px 0 0;
    border: none;
}

.textarea-container {
    position: relative;
}

.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 200px;
}

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

.form-control[readonly] {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.btn {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-group-custom .btn-lg {
    min-width: 160px;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62);
    border: none;
}

.btn-outline-info {
    border-color: #17a2b8;
    color: #17a2b8;
}

.btn-outline-info:hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border: none;
}

.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

.alert {
    border-radius: 8px;
    border: none;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

#statsInfo {
    animation: fadeIn 0.5s ease-in;
}

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

.compression-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.compression-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stats-header {
    display: flex;
    align-items: center;
    font-size: 1.2em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
    color: #007bff;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f1f3f4;
}

.stats-row:last-child {
    border-bottom: none;
}

.stats-row.highlight {
    background: linear-gradient(90deg, transparent 0%, rgba(0, 123, 255, 0.05) 50%, transparent 100%);
    border-radius: 4px;
    padding: 8px 12px;
    margin: 2px 0;
    font-weight: 600;
}

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

.stats-value {
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.compression-ratio.success {
    color: #28a745;
    font-size: 1.3em;
    font-weight: 700;
}

.compression-ratio.warning {
    color: #fd7e14;
    font-size: 1.3em;
    font-weight: 700;
}

.compression-indicator {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.compression-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.compression-fill {
    height: 100%;
    transition: width 0.5s ease-in-out;
    border-radius: 4px;
}

.compression-fill.success {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.compression-fill.warning {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}

.compression-label {
    text-align: center;
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 500;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.stats-item:last-child {
    margin-bottom: 0;
}

.text-success {
    color: #28a745 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.compression-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 10px;
    margin-top: 5px;
}

.compression-notice small {
    line-height: 1.4;
    display: block;
}

/* 알고리즘 선택 스타일 */
.algorithm-selection {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.algorithm-options .btn-check:checked + .btn-outline-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-color: #007bff;
    color: white;
}

.algorithm-options .btn-check:checked + .btn-outline-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border-color: #28a745;
    color: white;
}

.algorithm-options .btn-check:checked + .btn-outline-info {
    background: linear-gradient(135deg, #17a2b8, #117a8b);
    border-color: #17a2b8;
    color: white;
}

.algorithm-options .btn {
    padding: 12px 8px;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    border-width: 2px;
}

.algorithm-options .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.algorithm-options .btn small {
    font-size: 0.75em;
    margin-top: 2px;
    opacity: 0.8;
}

.algorithm-description {
    background: white;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #dee2e6;
}

.algorithm-description strong {
    color: #007bff;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .btn-group-custom {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-group-custom .btn-lg {
        width: 100%;
        min-width: auto;
        margin-bottom: 0.5rem;
    }
    
    .d-flex.gap-2 {
        flex-direction: column;
    }
    
    .d-flex.gap-2 .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .form-control {
        min-height: 150px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .stats-header {
        font-size: 1.1em;
    }
    
    .compression-ratio.success,
    .compression-ratio.warning {
        font-size: 1.2em;
    }
    
    .algorithm-selection {
        padding: 15px;
    }
    
    .algorithm-options .btn {
        min-height: 60px;
        padding: 8px;
        font-size: 0.9em;
    }
    
    .algorithm-options .row.g-2 {
        gap: 0.5rem;
    }
    
    .algorithm-description {
        padding: 10px;
        font-size: 0.9em;
    }
}

@media (max-width: 576px) {
    .card {
        margin: 0 10px;
    }
    
    .form-control {
        font-size: 14px;
    }
    
    .btn {
        font-size: 14px;
        padding: 6px 12px;
    }
}

/* 로딩 상태 */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 드래그 앤 드롭 스타일 */
.form-control.dragover {
    border-color: #007bff;
    background-color: #f0f8ff;
}

/* 텍스트 크기 정보 */
.text-size-info {
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 11px;
    color: #6c757d;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
}
