/* Sidebar styling */
.sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    border-right: 10px solid transparent;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    box-sizing: border-box;
}

/* Apply custom scrollbar to sidebar */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a42a0);
}

.place-list {
    display: grid;
    gap: 15px;
}

/* Responsive place cards */
.place-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8ecff 100%);
    padding: 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.place-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
    transition: left 0.5s;
}

.place-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.place-card:hover::before {
    left: 100%;
}

/* Place card content */
.place-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.place-category {
    display: inline-block;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.place-address {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.place-rating {
    color: #ffa500;
}

/* Photo styling */
.place-photo {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* Fallback for older browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 16/9) {
    .place-photo {
        width: 100%;
        height: 0;
        padding-bottom: 56.25%;
        background-size: cover;
        background-position: center;
        border-radius: 10px;
        margin-bottom: 10px;
        overflow: hidden;
        position: relative;
    }

    .photo-container {
        position: relative;
        margin-bottom: 10px;
    }

    .place-photo {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

.photo-container {
    position: relative;
    margin-bottom: 10px;
}

/* Instagram link styling */
.instagram-link {
    display: inline-block;
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.8rem;
    margin-top: 8px;
    transition: transform 0.2s;
}

.instagram-link:hover {
    transform: scale(1.05);
}

/* Edit and delete buttons */
.edit-btn {
    position: absolute;
    bottom: 10px;
    right: 48px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

.delete-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

.place-card:hover .edit-btn,
.place-card:hover .delete-btn {
    opacity: 1;
}

/* Desktop layout - image on top */
@media (min-width: 769px) {
    .place-card {
        flex-direction: column;
    }

    .place-photo {
        width: 100%;
        aspect-ratio: 16/9;
        object-fit: cover;
        border-radius: 10px;
        margin-bottom: 10px;
    }

    .photo-container {
        width: 100%;
        margin-bottom: 10px;
    }
}
