/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Card */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 20px;
}

.card h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.hint {
    margin-top: 5px;
    font-size: 0.85rem;
    color: #888;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-success {
    background: #4CAF50;
    color: white;
}

/* Progress bar */
.progress-container {
    margin-top: 20px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-header h3 {
    font-size: 1.2rem;
    color: #333;
}

.progress-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Steps */
.progress-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.step.active {
    background: #e3f2fd;
    color: #1976d2;
}

/* Result */
.result-success {
    text-align: center;
    padding: 30px;
}

.success-icon {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 20px;
}

.result-details {
    margin: 20px 0;
    text-align: left;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 10px;
}

.detail-item i {
    font-size: 1.2rem;
    color: #667eea;
}

.detail-item div {
    flex: 1;
}

.detail-item strong {
    display: block;
    margin-bottom: 2px;
    color: #333;
}

.match-percentage {
    font-weight: bold;
    color: #4CAF50;
}

.result-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Error */
.error-message {
    text-align: center;
    padding: 30px;
}

.error-icon {
    font-size: 4rem;
    color: #F44336;
    margin-bottom: 20px;
}

.error-message h3 {
    color: #F44336;
    margin-bottom: 10px;
}

.error-message p {
    color: #666;
    margin-bottom: 20px;
}

/* Status */
.status-area {
    text-align: center;
    padding: 40px;
}

.status-message {
    padding: 20px;
    border-radius: 8px;
}

.status-message.initial {
    background: #e3f2fd;
    color: #1976d2;
}

.status-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

/* Examples */
.examples {
    margin-top: 20px;
}

.examples h3 {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 10px;
}

.example-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.tag {
    padding: 8px 16px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.tag:hover {
    background: #bbdefb;
}

/* Info section */
.info-section {
    margin-top: 30px;
}

.info-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-step {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #667eea;
    color: white;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
}

.step-content h4 {
    color: #333;
    margin-bottom: 5px;
}

.step-content p {
    color: #666;
    font-size: 0.95rem;
}

.info-tips {
    margin-top: 20px;
    padding: 20px;
    background: #fff3e0;
    border-radius: 8px;
}

.info-tips h3 {
    color: #ff9800;
    margin-bottom: 15px;
}

.info-tips ul {
    list-style: none;
}

.info-tips li {
    padding: 8px 0;
    color: #555;
}

.info-tips li i {
    margin-right: 8px;
    color: #4CAF50;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    padding: 20px;
}

.footer p {
    margin-bottom: 10px;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-actions .btn {
        width: 100%;
    }
    
    .progress-steps {
        flex-direction: column;
    }
    
    .step {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .card {
        padding: 15px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Loading spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Print styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
    }
    
    .form-actions,
    .progress-container,
    .info-section {
        display: none;
    }
}