/* Reset and base styles */
* {
    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;
    color: #333;
    line-height: 1.6;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 480px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    border-radius: 0;
}

/* Header */
.app-header {
    text-align: center;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border-radius: 0 0 2rem 2rem;
    margin-bottom: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    font-size: 2rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

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

/* Main content */
.main-content {
    flex: 1;
    padding: 0 1.5rem 1.5rem;
}

/* Controls panel */
.controls-panel {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 0.9rem;
}

/* Slider styles */
.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 0.5rem;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dc2626;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dc2626;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.value-display {
    text-align: center;
    font-weight: 600;
    color: #dc2626;
    font-size: 1.1rem;
}

/* Checkbox styles */
.checkbox-label {
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    color: #d1d5db !important;
    line-height: 1.2 !important;
    gap: 0.75rem !important;
    flex-wrap: nowrap !important;
    position: relative !important;
    z-index: 1 !important;
}

.checkbox-label input[type="checkbox"] {
    display: none;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.checkbox-label span:not(.checkmark) {
    color: #d1d5db !important;
    font-weight: 500 !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 2 !important;
}

.checkmark {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    border: 2px solid #d1d5db !important;
    border-radius: 4px !important;
    position: relative !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    aspect-ratio: 1 !important;
    display: block !important;
    transform: scale(1) !important;
    transform-origin: center !important;
    flex-shrink: 0 !important;
    z-index: 1 !important;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #dc2626;
    border-color: #dc2626;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

/* Pick button */
.pick-button {
    width: 100%;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 1rem;
    padding: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
    margin-bottom: 2rem;
}

.pick-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(220, 38, 38, 0.4);
}

.pick-button:active {
    transform: translateY(0);
}

.pick-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.button-icon {
    font-size: 1.5rem;
}

/* Reset button */
.reset-button {
    width: 100%;
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    border: none;
    border-radius: 1rem;
    padding: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.3);
    margin-bottom: 2rem;
}

.reset-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(107, 114, 128, 0.4);
}

.reset-button:active {
    transform: translateY(0);
}

/* Analysis section */
.analysis-section {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.progress-container {
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc2626, #f59e0b);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.criteria-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.criteria-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
    transition: all 0.3s ease;
}

.criteria-item.completed {
    background: #ecfdf5;
    color: #059669;
}

.criteria-item.completed .criteria-icon {
    color: #059669;
}

.criteria-icon {
    font-size: 1.2rem;
    color: #9ca3af;
}

/* Result section */
.result-section {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.result-card {
    text-align: center;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.result-icon {
    font-size: 2rem;
}

.result-header h2 {
    color: #d1d5db;
    font-size: 1.3rem;
    font-weight: 600;
}

.winner-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.result-content h3 {
    color: #dc2626;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(220, 38, 38, 0.1);
    margin: 0;
}

.city-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.detail-label {
    font-weight: 500;
    color: #6b7280;
}

.detail-item span:last-child {
    font-weight: 600;
    color: #374151;
}

/* Weather section styles */
.weather-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 1rem;
    border: 1px solid #bae6fd;
}

.weather-content {
    min-height: 60px;
}

.weather-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #0369a1;
    font-size: 0.875rem;
}

.weather-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #bae6fd;
    border-top: 2px solid #0369a1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.weather-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.weather-icon {
    font-size: 2rem;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.weather-temp {
    font-size: 1.7rem;
    font-weight: 700;
    color: #0369a1;
}

.weather-desc {
    font-size: 0.875rem;
    color: #0c4a6e;
    font-weight: 500;
}

.weather-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.weather-detail {
    display: flex;
    justify-content: space-between;
    color: #0c4a6e;
}

.weather-detail span:first-child {
    font-weight: 500;
}

.weather-error {
    color: #dc2626;
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem;
}

/* Убираем подвал - приложение теперь выглядит как нативное */

/* Utility classes */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.analysis-section:not(.hidden),
.result-section:not(.hidden) {
    animation: fadeIn 0.5s ease-out;
}

.pick-button:not(:disabled):hover {
    animation: pulse 1s infinite;
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .app-container {
        border-radius: 0;
    }
    
    .app-header {
        border-radius: 0 0 1.5rem 1.5rem;
    }
    
    .main-content {
        padding: 0 1rem 1rem;
        flex: 1;
    }
    
    .controls-panel,
    .analysis-section,
    .result-section {
        padding: 1rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    }
    
    .app-container {
        background: rgba(31, 41, 55, 0.95);
        color: #f9fafb;
    }
    
    .controls-panel,
    .analysis-section,
    .result-section {
        background: #374151;
        color: #f9fafb;
    }
    
    .control-group label {
        color: #d1d5db;
    }
    
    .criteria-item {
        background: #4b5563;
        color: #d1d5db;
    }
    
    .criteria-item.completed {
        background: #065f46;
        color: #d1fae5;
    }
    
    .detail-item {
        background: #4b5563;
        color: #f9fafb;
    }
    
    .detail-label {
        color: #d1d5db;
    }
    
    .detail-item span:last-child {
        color: #f9fafb;
    }
    
    .weather-section {
        background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
        border-color: #3b82f6;
    }
    
    .weather-loading {
        color: #93c5fd;
    }
    
    .weather-spinner {
        border-color: #3b82f6;
        border-top-color: #93c5fd;
    }
    
    .weather-temp {
        color: #93c5fd;
    }
    
    .weather-desc {
        color: #bfdbfe;
    }
    
    .weather-detail {
        color: #bfdbfe;
    }
} 