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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 20px;
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.card-error {
    border-left: 4px solid #e74c3c;
}

.card-error h2 {
    color: #e74c3c;
    border-bottom-color: #e74c3c;
}

.card-success {
    border-left: 4px solid #27ae60;
}

.card-success h2 {
    color: #27ae60;
    border-bottom-color: #27ae60;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group select,
.form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group select:focus,
.form-group input[type="file"]:focus {
    outline: none;
    border-color: #3498db;
}

.btn-primary {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

.parsed-data {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.data-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.data-item {
    padding: 18px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    border-left: 4px solid #3498db;
    transition: transform 0.2s, box-shadow 0.2s;
}

.data-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.data-item.full-width {
    grid-column: 1 / -1;
}

.data-item strong {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
}

.data-item .value {
    display: block;
    color: #2c3e50;
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 5px;
}

.data-item .value.missing {
    color: #e74c3c;
    font-style: italic;
    font-weight: 400;
}

.container-list {
    list-style: none;
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.container-list li {
    padding: 12px 16px;
    background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 100%);
    margin-bottom: 0;
    border-radius: 8px;
    border: 2px solid #4caf50;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
}

.container-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.container-number {
    color: #2c3e50;
    letter-spacing: 1px;
}

.container-valid {
    color: #4caf50;
    font-size: 1.2rem;
    font-weight: bold;
    margin-left: 10px;
}

.hint {
    margin-top: 20px;
    padding: 14px 18px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 0.9rem;
    line-height: 1.6;
}

.hint.success {
    background-color: #d4edda;
    border-left-color: #27ae60;
    color: #155724;
}

.text-preview {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 500px;
    overflow-y: auto;
}

.weights-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weight-item {
    padding: 10px 14px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffffff 100%);
    border-radius: 6px;
    border-left: 3px solid #ff9800;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.weight-item.total {
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
    border-left-color: #2196f3;
    margin-top: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.weight-label {
    color: #555;
    font-size: 0.95rem;
}

.weight-value {
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px;
    }
}

