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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    margin: 20px;
}

.header {
    text-align: center;
    margin-bottom: 24px;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.header p {
    color: #718096;
    font-size: 16px;
}

.input-section {
    margin-bottom: 24px;
}

input[type="text"] {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    margin-bottom: 16px;
    outline: none;
}

input[type="text"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

button:active {
    transform: scale(0.98);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.result-section {
    margin-bottom: 24px;
    animation: fadeIn 0.5s ease;
}

.result-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    border-left: 4px solid #667eea;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.result-header h2 {
    color: #2d3748;
    font-size: 18px;
}

.result-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.badge-dagestan {
    background: #48bb78;
    color: white;
}

.badge-not-dagestan {
    background: #f56565;
    color: white;
}

.probability-display {
    text-align: center;
    margin-bottom: 20px;
}

#probabilityValue {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.probability-label {
    color: #718096;
    font-size: 14px;
}

.slider-container {
    margin-bottom: 15px;
}

.slider-track {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    margin: 10px 0;
}

.slider-thumb {
    position: absolute;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    color: #718096;
    font-size: 12px;
    font-weight: 500;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #f56565;
    animation: shake 0.5s ease;
}

.examples {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.examples h3 {
    color: #2d3748;
    margin-bottom: 12px;
    font-size: 16px;
}

.examples button {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    margin: 5px 0;
    font-size: 14px;
}

.examples button:active {
    background: #edf2f7;
    transform: none;
}

.hidden {
    display: none;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Адаптивность для мобильных */
@media (max-width: 480px) {
    .container {
        padding: 20px;
        margin: 10px;
        border-radius: 16px;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    input[type="text"] {
        padding: 14px;
        font-size: 16px;
    }
    
    button {
        padding: 14px;
        font-size: 16px;
    }
    
    #probabilityValue {
        font-size: 32px;
    }
    
    .result-card {
        padding: 16px;
    }
}

/* Поддержка темной темы */
@media (prefers-color-scheme: dark) {
    .container {
        background: #2d3748;
        color: white;
    }
    
    .header h1 {
        color: white;
    }
    
    .header p {
        color: #cbd5e0;
    }
    
    input[type="text"] {
        background: #4a5568;
        border-color: #4a5568;
        color: white;
    }
    
    .result-card {
        background: #4a5568;
    }
    
    .result-header h2 {
        color: white;
    }
}
