* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    overflow: hidden;
    height: 100vh;
    background: #f5f5f5;
}

.app {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Шапка */
header {
    background: #2196F3;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Переключатель */
.status-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

#statusText {
    font-size: 0.9rem;
}

/* Карта */
#map {
    flex: 1;
    width: 100%;
    z-index: 1;
}

/* Кнопка центрирования */
.center-btn {
    position: absolute;
    bottom: 120px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2196F3;
    transition: all 0.2s ease;
    z-index: 1000;
    padding: 0;
}

.center-btn:hover {
    background: #f5f5f5;
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

.center-btn:active {
    transform: scale(0.95);
}

.center-btn svg {
    width: 28px;
    height: 28px;
}

/* Анимация пульсации */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(33, 150, 243, 0); }
    100% { box-shadow: 0 0 0 0 rgba(33, 150, 243, 0); }
}

.center-btn.highlight {
    animation: pulse 1.5s infinite;
}

/* Нижняя панель */
.bottom-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.1);
    transform: translateY(80%);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
}

.bottom-panel.expanded {
    transform: translateY(0);
}

.drag-handle {
    width: 40px;
    height: 5px;
    background: #ddd;
    border-radius: 10px;
    margin: 10px auto;
    cursor: pointer;
}

.panel-content {
    padding: 20px;
}

h3 {
    margin: 15px 0 10px;
    color: #333;
    font-size: 1.1rem;
}

.goals {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.goal-btn {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.goal-btn.active {
    background: #2196F3;
    color: white;
    border-color: #2196F3;
}

textarea {
    width: 100%;
    height: 80px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    resize: none;
    font-family: inherit;
}

.photo-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.photo-preview {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-btn {
    padding: 10px 20px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.photo-btn:hover {
    background: #e0e0e0;
}

.save-btn {
    width: 100%;
    padding: 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin: 20px 0;
}

.save-btn:hover {
    background: #45a049;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .center-btn {
        bottom: 100px;
        right: 15px;
        width: 48px;
        height: 48px;
    }
    
    .center-btn svg {
        width: 24px;
        height: 24px;
    }
}