:root {
    --primary: #4a90e2;
    --secondary: #f0f4f8;
    --accent: #ff6b6b;
    --success: #2ecc71;
    --background: #f8fbff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --glass: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --border-radius: 20px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body, html, #app {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--background);
    color: var(--text);
}

/* Header */
.glass-header {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 500px;
    min-height: 50px;
    padding: 10px 15px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glass-shadow);
    z-index: 1000;
}

.glass-header h1 {
    font-size: 1.25rem;
    font-weight: 800;
    text-align: center;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    color: var(--primary);
}

.glass-header h1 .subtitle {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-light);
    display: block;
    margin-top: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Map */
#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* FAB (Floating Action Button) */
.fab {
    position: absolute;
    bottom: 30px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 2rem;
    z-index: 1000;
    transition: var(--transition);
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
}

.fab.active {
    background: var(--accent);
    transform: rotate(45deg);
}

.secondary-fab {
    bottom: 100px;
    background: white;
    color: var(--primary);
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
}

.secondary-fab:hover {
    transform: scale(1.1);
}

/* User Location Marker */
.user-location-dot {
    width: 20px;
    height: 20px;
    background: #2196F3;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    animation: pulsate 2s infinite;
}

@keyframes pulsate {
    0%   { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.7); }
    70%  { transform: scale(1);   box-shadow: 0 0 0 12px rgba(33, 150, 243, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(33, 150, 243, 0); }
}

/* Emoji Markers */
.emoji-marker-inner {
    font-size: 1.6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
    transition: transform 0.15s ease;
}

.emoji-marker:hover .emoji-marker-inner {
    transform: scale(1.25);
}

/* Panels */
.panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 85%;
    background: white;
    border-radius: 30px 30px 0 0;
    z-index: 1001;
    padding: 0 0 20px 0; /* Changed padding to 0 and handle it in content */
    overflow-y: auto;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
}

.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.hidden {
    transform: translateY(110%) !important;
}

.panel-handle {
    width: 40px;
    height: 5px;
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
    margin: 10px auto 15px;
}

.panel-content {
    padding: 0 20px 30px;
}

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

.detail-header h2 {
    margin-bottom: 0;
    flex: 1;
}

/* Ratings */
.ratings-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0;
}

.rating-item {
    background: rgba(0,0,0,0.03);
    padding: 8px 12px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 100px;
}

.rating-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
}

.rating-stars {
    color: #f1c40f;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.description-container {
    margin: 20px 0;
    padding-bottom: 25px; /* Fix: Extra padding before actions */
    line-height: 1.6;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 20px;
}

/* Form Ratings */
.rating-group {
    margin-bottom: 15px;
    background: rgba(255,255,255,0.5);
    padding: 12px;
    border-radius: 15px;
    border: 1px solid rgba(0,0,0,0.05);
}

.rating-group label {
    display: block;
    margin-bottom: 8px !important;
    font-size: 0.85rem !important;
}

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

.star {
    font-size: 1.8rem;
    color: #ddd;
    cursor: pointer;
    transition: var(--transition);
}

.star:hover,
.star:hover ~ .star,
.star.active,
.star.active ~ .star {
    color: #f1c40f;
    transform: scale(1.1);
}

.panel-content h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.instruction {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    padding-left: 5px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    background: white;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

button.primary, button.secondary {
    padding: 15px 25px;
    border-radius: 15px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    flex: 1;
    transition: var(--transition);
}

button.primary {
    background: var(--primary);
    color: white;
}

button.secondary {
    background: var(--secondary);
    color: var(--text);
}

button:active {
    transform: scale(0.95);
}

/* Details */
#poi-image-container img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
}

.category-tag {
    display: inline-block;
    padding: 5px 12px;
    background: var(--secondary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary);
}

/* Leaflet Overrides */
.leaflet-popup-content-wrapper {
    border-radius: 15px;
}
.leaflet-control-zoom {
    display: none; /* Hide zoom on mobile */
}

@media (min-width: 768px) {
    .panel {
        width: 400px;
        left: auto;
        right: 20px;
        bottom: 20px;
        border-radius: 20px;
        max-height: 80vh;
    }
    .hidden {
        transform: translateY(150%);
    }
    .leaflet-control-zoom {
        display: block;
    }
}
