* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 15px 15px 0 0;
}

.header h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 14px;
}

.content {
    padding: 30px;
}

.section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-upload {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    background: #3498db;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.file-upload-label:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.file-name {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border-radius: 5px;
    color: #27ae60;
    font-weight: bold;
    display: none;
}

.detection-info {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.8;
    display: none;
}

.detection-info strong {
    color: #2c3e50;
}

.manual-config {
    background: #fff3cd;
    border: 2px solid #ffc107;
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
    display: none;
}

.manual-config-title {
    font-weight: bold;
    color: #856404;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.column-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    padding: 15px;
    border-radius: 8px;
}

.column-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 13px;
}

.column-item label {
    font-weight: bold;
    color: #2c3e50;
}

.column-item select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 12px;
    cursor: pointer;
}

.btn-validate-config {
    margin-top: 15px;
    padding: 10px 20px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-validate-config:hover {
    background: #229954;
    transform: translateY(-2px);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-item:hover {
    background: #e8f4f8;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    flex: 1;
}

.highlight-option {
    background: #d5f4e6 !important;
    border: 2px solid #27ae60;
}

.warning {
    background: #fff3cd;
    color: #856404;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 13px;
    margin-top: 10px;
    border-left: 4px solid #ffc107;
}

.btn-anonymize {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: none;
}

.btn-anonymize:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4);
}

.btn-anonymize:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.k-indicators {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    display: none;
}

.k-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #3498db;
}

.k-card.version-k3 {
    border-left-color: #27ae60;
}

.k-card-title {
    font-size: 14px;
    font-weight: bold;
    color: #7f8c8d;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.k-value {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.k-number {
    font-size: 48px;
    font-weight: bold;
    color: #2c3e50;
}

.k-label {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.conformity-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 13px;
    margin-top: 10px;
}

.conformity-badge.conforme {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.conformity-badge.acceptable {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffc107;
}

.conformity-badge.non-conforme {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
}

.risk-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 10px;
}

.risk-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.risk-critical {
    background: #e74c3c;
}

.risk-high {
    background: #e67e22;
}

.risk-moderate {
    background: #f39c12;
}

.risk-low {
    background: #27ae60;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
    font-size: 13px;
}

.stats-row:last-child {
    border-bottom: none;
}

.stats-label {
    color: #7f8c8d;
}

.stats-value {
    font-weight: bold;
    color: #2c3e50;
}

.results {
    background: #2c3e50;
    color: white;
    padding: 20px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.8;
    white-space: pre-wrap;
    max-height: 500px;
    overflow-y: auto;
    display: none;
}

.results::-webkit-scrollbar {
    width: 8px;
}

.results::-webkit-scrollbar-track {
    background: #34495e;
    border-radius: 10px;
}

.results::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 15px;
    margin-right: 10px;
    transition: all 0.3s;
    text-decoration: none;
}

.download-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.footer {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 12px;
    border-top: 1px solid #ecf0f1;
}