* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 15px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

header h1 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.8em;
    line-height: 1.3;
}

header p {
    color: #7f8c8d;
    font-size: 1em;
    line-height: 1.4;
}

.form-container {
    background: white;
    padding: 25px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1em;
}

select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232c3e50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 50px;
}

select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

select:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.7;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    touch-action: manipulation;
}

button:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(52, 152, 219, 0.3);
}

button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loading {
    text-align: center;
    padding: 30px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result-container {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 5px solid #3498db;
}

.result-container h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5em;
    text-align: center;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.result-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.result-item h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 1.3em;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.result-item p {
    margin: 12px 0;
    color: #555;
    font-size: 1em;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.result-item .price {
    font-weight: bold;
    color: #27ae60;
    font-size: 1.2em;
    display: inline-block;
    word-break: break-word;
}

/* Стили для предупреждения */
.warning-box {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 5px solid #f39c12;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    font-size: 1em;
}

.warning-title {
    color: #d35400;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.warning-text {
    color: #7d6608;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.error-container {
    background: #fee;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    font-size: 1em;
}

.error-container p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

footer {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.9em;
    margin-top: 30px;
    line-height: 1.4;
}

/* Мобильные стили */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 15px 10px;
        margin-bottom: 20px;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    header p {
        font-size: 0.95em;
    }
    
    .form-container {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
    
    select {
        padding: 16px;
        font-size: 17px; /* Увеличиваем для удобства на мобильных */
        background-position: right 16px center;
        padding-right: 50px;
    }
    
    button {
        padding: 18px;
        font-size: 17px;
        margin-top: 15px;
    }
    
    .result-container {
        padding: 15px;
        margin-top: 20px;
    }
    
    .result-container h2 {
        font-size: 1.3em;
    }
    
    .result-item {
        padding: 15px;
    }
    
    .result-item h3 {
        font-size: 1.2em;
    }
    
    .warning-box {
        padding: 12px;
        font-size: 0.95em;
    }
    
    .error-container {
        padding: 15px;
        font-size: 0.95em;
    }
}

/* Маленькие мобильные устройства */
@media (max-width: 480px) {
    body {
        padding: 8px;
    }
    
    header {
        padding: 12px 8px;
        margin-bottom: 15px;
    }
    
    header h1 {
        font-size: 1.3em;
    }
    
    header p {
        font-size: 0.9em;
    }
    
    .form-container {
        padding: 15px 12px;
    }
    
    select {
        padding: 14px;
        font-size: 16px;
        background-position: right 12px center;
        padding-right: 45px;
    }
    
    button {
        padding: 16px;
        font-size: 16px;
    }
    
    .result-item p {
        font-size: 0.95em;
    }
    
    .result-item .price {
        font-size: 1.1em;
    }
    
    footer {
        padding: 15px;
        font-size: 0.85em;
    }
}

/* Планшеты и десктопы */
@media (min-width: 769px) {
    .result-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
}

/* Большие экраны */
@media (min-width: 1024px) {
    header h1 {
        font-size: 2em;
    }
    
    header p {
        font-size: 1.1em;
    }
    
    .form-container {
        padding: 30px;
    }
    
    .result-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}