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

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f9fafb;
    color: #1f2937;
    min-height: 100vh;
    padding: 24px;
    line-height: 1.6;
}

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

h1 {
    text-align: center;
    color: #111827;
    margin: 32px 0 24px;
    font-weight: 600;
    font-size: 28px;
}

.input-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
    gap: 16px;
}

.add-widget,
.add-widget-by-coords {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

#location-input,
#lat-input,
#lon-input {
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    width: 200px;
    font-size: 16px;
    background-color: #fff;
    color: #1f2937;
    transition: border-color 0.2s;
}

#location-input:focus,
#lat-input:focus,
#lon-input:focus {
    outline: none;
    border-color: #3b82f6;
}

#add-widget-btn,
#add-by-coords-btn {
    padding: 10px 18px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s;
}

#add-widget-btn:hover,
#add-by-coords-btn:hover {
    background-color: #2563eb;
}

#weather-widgets-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.weather-widget {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    max-width: 300px;
    text-align: center;
    transition: border-color 0.2s;
}

.weather-widget:hover {
    border-color: #cbd5e1;
}

.weather-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.delete-widget {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    padding: 4px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.delete-widget:hover {
    background-color: #fee2e2;
}

.weather-icon {
    width: 72px;
    height: 72px;
    margin: 12px auto;
}

.weather-location {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #111827;
}

.weather-temp {
    font-size: 40px;
    font-weight: 700;
    color: #1e40af;
    margin: 12px 0;
}

.weather-description {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 8px;
}

.weather-time {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.weather-details {
    display: flex;
    justify-content: space-around;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.weather-detail {
    text-align: center;
}

.weather-detail-label {
    font-size: 12px;
    color: #9ca3af;
}

.weather-detail-value {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

.show-map {
    padding: 8px 16px;
    background-color: #10b981;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    margin-top: 12px;
}

.show-map:hover {
    background-color: #059669;
}

.map-container {
    margin-top: 16px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}


/* Адаптивность */

@media (max-width: 768px) {
    .weather-widget {
        max-width: 100%;
    }
    .input-section {
        width: 100%;
    }
    #location-input,
    #lat-input,
    #lon-input {
        width: 160px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 16px;
    }
    h1 {
        font-size: 24px;
        margin: 24px 0 20px;
    }
    #location-input,
    #lat-input,
    #lon-input {
        width: 130px;
        font-size: 14px;
        padding: 8px 12px;
    }
    #add-widget-btn,
    #add-by-coords-btn {
        padding: 8px 14px;
        font-size: 14px;
    }
    .weather-temp {
        font-size: 32px;
    }
    .weather-widget {
        padding: 16px;
    }
}