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

body {
    font-family: 'Poppins', sans-serif;
    background: #f5f6fa;
}

/* Header */
.header {
    background: linear-gradient(135deg, #fe2c55 0%, #25f4ee 100%);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 20px;
}

.logo span {
    font-size: 28px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 20px;
    transition: background 0.3s;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main container */
.main-container {
    display: flex;
    height: calc(100vh - 70px);
    margin-top: 70px;
}

/* Sidebar */
.sidebar {
    width: 380px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 500;
}

.sidebar-header {
    padding: 15px 20px;
    padding-top: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.filter-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #eee;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    transition: all 0.3s;
}

.filter-btn.active {
    border-color: #fe2c55;
    color: #fe2c55;
    background: #fff5f7;
}

.places-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.place-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.place-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.place-card.visited {
    border-left: 4px solid #00b894;
}

.place-card.pending {
    border-left: 4px solid #fdcb6e;
}

.place-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.place-name {
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

.place-category {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.place-address {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.place-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stars {
    color: #f1c40f;
    font-size: 14px;
}

.place-meta {
    font-size: 11px;
    color: #999;
}

/* Map */
#map {
    flex: 1;
    height: 100%;
    position: relative;
}

/* Location button on map */
.location-btn {
    position: absolute;
    bottom: 120px;
    left: 10px;
    width: 44px;
    height: 44px;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background 0.3s;
}

.location-btn:hover {
    background: #f4f4f4;
}

.location-btn.loading {
    animation: blink 0.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes blink {
    0%, 100% {
        background: white;
    }
    50% {
        background: #3498db;
        color: white;
    }
}

/* FAB Button */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fe2c55 0%, #ff6b6b 100%);
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 5px 30px rgba(254, 44, 85, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 40px rgba(254, 44, 85, 0.6);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #fe2c55;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.star-rating {
    display: flex;
    gap: 5px;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 28px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating label:hover,
.star-rating label:hover~label,
.star-rating input:checked~label {
    color: #f1c40f;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #fe2c55 0%, #ff6b6b 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    background: #eee;
    color: #333;
}

.btn-secondary:hover {
    background: #ddd;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.btn-success {
    background: linear-gradient(135deg, #00b894 0%, #00a878 100%);
}

.location-picker {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.location-picker p {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.location-picker .coords {
    font-family: monospace;
    font-size: 12px;
    color: #999;
}

#miniMap {
    height: 200px;
    border-radius: 8px;
    margin-top: 10px;
}

/* Media gallery */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.media-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item .delete-media {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.upload-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-zone:hover {
    border-color: #fe2c55;
    background: #fff5f7;
}

.upload-zone p {
    color: #666;
    font-size: 14px;
}

/* Category badge */
.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.lightbox.active {
    display: flex;
}

.lightbox img,
.lightbox video {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 4000;
    display: none;
}

.toast.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 10px 15px;
    }

    .logo {
        font-size: 16px;
    }

    .logo span {
        font-size: 22px;
    }

    .main-container {
        margin-top: 60px;
        height: calc(100vh - 60px);
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: 60px;
        bottom: 0;
        width: 100%;
        max-width: 350px;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .toggle-sidebar {
        display: flex;
    }

    .btn-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .header-actions {
        gap: 8px;
    }

    .user-info {
        font-size: 12px;
        padding: 4px 8px;
    }

    .fab {
        bottom: 20px;
        right: 20px;
        width: 54px;
        height: 54px;
        font-size: 24px;
    }

    .location-btn {
        bottom: 100px;
    }

    /* Ocultar zoom en móvil - usar pellizco */
    .leaflet-control-zoom {
        display: none;
    }
}

@media (min-width: 769px) {
    .toggle-sidebar {
        display: none;
    }
}

/* Custom Leaflet popup */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
}

.popup-content {
    min-width: 200px;
}

.popup-content h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.popup-content p {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.popup-actions {
    display: flex;
    gap: 8px;
}

.popup-actions button {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: #fe2c55;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state span {
    font-size: 60px;
    display: block;
    margin-bottom: 15px;
}

/* Button group */
.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-group .btn-primary {
    flex: 1;
}

/* Profile section */
.profile-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fe2c55 0%, #25f4ee 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 15px;
}

.profile-name {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.profile-email {
    font-size: 14px;
    color: #999;
}

.form-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.form-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

/* Notification Popup */
.notification-popup {
    position: fixed;
    top: 80px;
    right: 20px;
    max-width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 5000;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.notification-popup.show {
    transform: translateX(0);
}

.notification-popup::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #fe2c55 0%, #25f4ee 100%);
}

.notification-content {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    padding-left: 20px;
    gap: 12px;
}

.notification-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.notification-text {
    flex: 1;
}

.notification-text strong {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.notification-text p {
    font-size: 15px;
    color: #333;
    font-weight: 500;
    margin-bottom: 2px;
}

.notification-text small {
    font-size: 12px;
    color: #999;
}

.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.notification-close:hover {
    background: #f0f0f0;
    color: #333;
}

@media (max-width: 768px) {
    .notification-popup {
        top: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}