* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 90vh;
}

header {
    background: linear-gradient(135deg, #002868 0%, #004ba0 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.project-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.powered-by {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 8px;
}

.upload-section {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.upload-area {
    border: 3px dashed #002868;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9fa;
}

.upload-area:hover {
    border-color: #004ba0;
    background: #e9ecef;
}

.upload-area.drag-over {
    border-color: #BF0A30;
    background: #fff5f5;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #002868;
    margin-bottom: 10px;
}

.upload-hint {
    font-size: 0.9rem;
    color: #666;
}

.status-message {
    padding: 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: center;
    display: none;
}

.status-message.show {
    display: block;
}

.status-message.processing {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.status-message.success {
    background: #d4edda;
    border: 1px solid #28a745;
    color: #155724;
}

.status-message.error {
    background: #f8d7da;
    border: 1px solid #dc3545;
    color: #721c24;
}

.results-section {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.results-section h2 {
    color: #002868;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.result-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.result-label {
    font-weight: 600;
    color: #002868;
    font-size: 1rem;
}

.result-value {
    color: #333;
    font-weight: 500;
    font-size: 1rem;
}

.severity-card {
    border-left: 4px solid #002868;
}

.severity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.severity-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.severity-CRITICAL {
    background: #dc3545;
    color: white;
}

.severity-HIGH {
    background: #fd7e14;
    color: white;
}

.severity-MEDIUM {
    background: #ffc107;
    color: #333;
}

.severity-LOW {
    background: #28a745;
    color: white;
}

.severity-INFO {
    background: #17a2b8;
    color: white;
}

.count-badge {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.error-count {
    background: #dc3545;
    color: white;
}

.warning-count {
    background: #ffc107;
    color: #333;
}

.summary-text {
    color: #333;
    line-height: 1.6;
    font-size: 0.95rem;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item-entry {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
}

.item-entry.error-entry {
    border-left: 4px solid #dc3545;
}

.item-entry.warning-entry {
    border-left: 4px solid #ffc107;
}

.item-entry.pattern-entry {
    border-left: 4px solid #17a2b8;
}

.item-entry.action-entry {
    border-left: 4px solid #28a745;
}

.item-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.item-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 6px;
}

.item-detail {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.5;
    margin-bottom: 4px;
}

.item-detail strong {
    color: #002868;
}

.item-commands {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 10px 14px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    margin-top: 8px;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
}

.prevention-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prevention-list li {
    padding: 10px 14px;
    background: white;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #002868;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.5;
}

.clear-button {
    padding: 14px 24px;
    background: #002868;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    align-self: center;
}

.clear-button:hover {
    background: #004ba0;
}

footer {
    padding: 18px 15px;
    text-align: center;
    background: #f8f9fa;
    color: #666;
    font-size: 1rem;
    border-top: 2px solid #002868;
}

footer p {
    margin-bottom: 10px;
}

.back-link {
    color: #BF0A30;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.3s;
    display: inline-block;
    font-weight: 500;
}

.back-link:hover {
    background: #e9ecef;
}

.diagram-link {
    color: #002868;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s;
}

.diagram-link:hover {
    color: #004ba0;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .container {
        min-height: 95vh;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .upload-section,
    .results-section {
        padding: 20px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .severity-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
