/* 해시 생성기 스타일 */
.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(27, 30, 36, 0.05);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}


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




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

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

.algorithm-item:hover {
    border-color: #3b6fe0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 30, 36, 0.05);
}

.algorithm-item.active {
    border-color: #3b6fe0;
    background: #f8f9ff;
}

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

.algorithm-item label {
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    margin: 0;
}

/* 버튼 스타일 */






/* 결과 영역 */
.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: var(--bg-card);
    border: 1px solid var(--border-color-light);
    border-radius: 8px;
    overflow: hidden;
}

.hash-result-header {
    background: #ffffff;
    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: var(--text-primary);
}

.hash-result-value {
    padding: 15px;
    background: var(--bg-card);
}

.hash-result-value .form-control {
    font-family: 'Courier New', monospace;
    background: #ffffff;
    border: 1px solid var(--border-color-light);
    font-size: 12px;
    word-break: break-all;
    color: var(--text-primary);
}

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

.file-upload-area:hover {
    border-color: #3b6fe0;
    background: #f8f9ff;
}

.file-upload-area.dragover {
    border-color: #3b6fe0;
    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-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;
}

body.dark-theme .alert-warning {
    background: linear-gradient(135deg, #fdf0e3 0%, #f7e2c6 100%) !important;
    color: #96521f !important;
    border-color: #96521f !important;
}

.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: var(--text-primary);
    font-weight: 500;
}


small {
    color: var(--text-muted);
}

/* 도구 페이지 다크 테마 (숨겨진 UI: fileInfo, resultsCard 포함) */
.tool-page .card-header.bg-light {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color);
}

.tool-page .card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

.tool-page .card-body {
    color: var(--text-primary);
}

.tool-page .file-info {
    background: rgba(59, 111, 224, 0.12) !important;
    border-color: var(--accent-primary) !important;
    color: var(--text-primary) !important;
}

.tool-page .alert-success {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: var(--accent-success);
    color: var(--text-primary) !important;
}

.tool-page .alert-info {
    background: rgba(59, 111, 224, 0.12) !important;
    border-color: var(--accent-primary);
    color: var(--text-primary) !important;
}

.tool-page .hash-result-header {
    background: #ffffff;
    border-bottom-color: var(--border-color-light);
}