/* 해시 생성기 스타일 */
.hash-generator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.settings-card, .input-card, .results-card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 20px;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
    color: white;
}

.card-body {
    padding: 25px;
    background: #ffffff;
    color: #212529;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #212529;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: #ffffff;
    color: #212529;
}

/* 알고리즘 선택 */
.algorithm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.algorithm-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.algorithm-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.algorithm-item.active {
    border-color: #667eea;
    background: #f8f9ff;
}

.algorithm-item .form-check-input {
    margin-bottom: 8px;
    transform: scale(1.2);
}

.algorithm-item label {
    font-weight: 500;
    color: #212529;
    cursor: pointer;
    margin: 0;
}

/* 버튼 스타일 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: white;
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    border-radius: 8px;
    padding: 10px 25px;
    transition: all 0.3s ease;
    color: #6c757d;
    background: white;
}

.btn-outline-secondary:hover {
    transform: translateY(-2px);
    background: #6c757d;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    color: white;
}

/* 결과 영역 */
.results-card {
    display: none;
}

.results-card.show {
    display: block;
    animation: slideIn 0.5s ease;
}

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

.hash-result-group {
    margin-bottom: 20px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.hash-result-header {
    background: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hash-result-header .hash-type {
    font-weight: 600;
    color: #212529;
}

.hash-result-value {
    padding: 15px;
    background: white;
}

.hash-result-value .form-control {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    font-size: 12px;
    word-break: break-all;
    color: #212529;
}

/* 파일 업로드 영역 */
.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    margin: 15px 0;
    background: white;
    color: #212529;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: #f0f8ff;
}

.file-info {
    background: #e7f3ff;
    border: 1px solid #b3d7ff;
    border-radius: 6px;
    padding: 10px 15px;
    margin: 10px 0;
    display: none;
    color: #0c5460;
}

.file-info.show {
    display: block;
}

/* 반응형 */
@media (max-width: 768px) {
    .algorithm-grid {
        grid-template-columns: 1fr;
    }

    .hash-generator-container {
        padding: 10px;
    }

    .card-body {
        padding: 20px 15px;
    }
}

/* 로딩 상태 */
.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 {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 알림 메시지 개선 */
.alert {
    border: none;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

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

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

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

/* 복사 버튼 */
.copy-btn {
    background: #17a2b8;
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #138496;
    color: white;
}

/* 라벨 및 텍스트 색상 개선 */
.form-label {
    color: #212529;
    font-weight: 500;
}

.text-muted {
    color: #6c757d !important;
}

small {
    color: #6c757d;
}