* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 2em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.form-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group .hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #888;
}

.btn-generate {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 5px;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* ===== КАРТА И ПОИСК ===== */
.map-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 15px;
}

.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    width: 100%;
}

.search-input {
    flex: 1;
    padding: 12px 16px !important;
    border: 2px solid #d0d0d0 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    background: white !important;
    color: #333 !important;
    transition: all 0.3s ease !important;
    height: 44px !important;
    outline: none !important;
    box-shadow: none !important;
    min-width: 0 !important;
}

.search-input::placeholder {
    color: #999 !important;
    font-size: 14px !important;
}

.search-input:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15) !important;
    outline: none !important;
}

.search-input:hover {
    border-color: #667eea !important;
}

.search-btn {
    padding: 0 24px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    white-space: nowrap !important;
    height: 44px !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
    flex-shrink: 0 !important;
}

.search-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

.search-btn:active {
    transform: translateY(0) !important;
}

#map {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    background: #e9ecef;
    z-index: 1;
}

.map-controls {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.map-controls button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 80px;
    font-size: 13px;
}

.btn-geo {
    background: #28a745;
    color: white;
}
.btn-geo:hover {
    background: #218838;
}

.btn-clear {
    background: #dc3545;
    color: white;
}
.btn-clear:hover {
    background: #c82333;
}

.selected-address {
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    min-height: 40px;
    font-size: 14px;
}

.selected-address strong {
    color: #333;
}

.selected-address span {
    color: #667eea;
    font-weight: 500;
}

/* Результаты */
#results {
    margin-top: 30px;
    display: none;
}

.results-title {
    text-align: center;
    margin: 20px 0;
    color: #333;
}

.result-card {
    max-width: 600px;
    margin: 0 auto;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Сайт-визитка */
.business-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    border: 2px solid #667eea;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.website-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.card-header {
    border-bottom: 2px solid #667eea;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.card-header h2 {
    color: #333;
    font-size: 22px;
}

.card-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.card-info p {
    margin: 10px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

.card-info span {
    color: #333;
    font-weight: 500;
}

.card-qr {
    text-align: center;
}

.card-qr img {
    max-width: 130px;
    height: auto;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px;
    background: white;
}

.qr-label {
    margin-top: 10px;
    font-size: 12px;
    color: #888;
}

/* Мини-карта */
.mini-map-wrapper {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.mini-map {
    width: 160px;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid #667eea;
    background: #f0f0f0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.mini-map .leaflet-container {
    width: 100% !important;
    height: 100% !important;
}

.mini-map-label {
    text-align: center;
    margin-top: 5px;
    font-size: 12px;
    color: #888;
}

/* Кнопки действий */
.card-actions {
    display: flex;
    gap: 15px;
}

.btn-print,
.btn-visit {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-print {
    background: #28a745;
    color: white;
}
.btn-print:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-visit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}
.btn-visit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* Адаптивность */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: 1fr;
    }
    .card-body {
        grid-template-columns: 1fr;
    }
    .card-qr {
        order: -1;
    }
    .mini-map {
        width: 130px;
        height: 130px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    h1 {
        font-size: 24px;
    }
    .form-section,
    .map-section {
        padding: 15px;
    }
    #map {
        height: 300px;
    }
    .search-container {
        flex-direction: column;
    }
    .search-btn {
        width: 100%;
        justify-content: center;
        height: 44px !important;
    }
    .mini-map {
        width: 110px;
        height: 110px;
    }
    .card-actions {
        flex-direction: column;
    }
    .result-card {
        padding: 15px;
    }
    .business-card {
        padding: 15px;
    }
}

/* Для печати */
@media print {
    .btn-generate,
    .map-controls,
    .search-container,
    .btn-print,
    .btn-visit,
    .map-section,
    .card-actions {
        display: none !important;
    }
    .container {
        box-shadow: none !important;
        padding: 10px !important;
    }
    .result-card {
        max-width: 100% !important;
        padding: 0 !important;
        background: none !important;
    }
    .business-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
    .mini-map {
        width: 120px !important;
        height: 120px !important;
    }
}