/* General Styles */
.hotspot-upload-wrapper, .hotspot-feed-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Upload Form */
.drop-zone {
    max-width: 100%;
    height: 200px;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 500;
    font-size: 20px;
    cursor: pointer;
    color: #cccccc;
    border: 4px dashed #007bff;
    border-radius: 10px;
    transition: background-color 0.2s;
}

.drop-zone--over {
    background-color: #f0f8ff;
}

.drop-zone__input {
    display: none;
}

#hotspot-details-form p {
    margin: 15px 0;
}

#hotspot-details-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#hotspot-details-form input[type="text"],
#hotspot-details-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Instagram-like Video Grid */
.hotspot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2px;
    background-color: #000;
    padding: 2px;
    border-radius: 8px;
}

/* Latest Videos Grid - 3 videos in a row */
.hotspot-latest-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Video Card - Instagram Style */
.video-card {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Square aspect ratio like Instagram */
    overflow: hidden;
    cursor: pointer;
    background-color: #000;
    transition: transform 0.2s ease;
}

.video-card:hover {
    transform: scale(1.02);
}

.video-card.playing {
    box-shadow: 0 0 0 2px #0095f6;
}

.video-card video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #000;
}

/* Video Card Overlay */
.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent 60%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-card:hover::before {
    opacity: 1;
}

/* Video Info Overlay */
.video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    color: white;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-card:hover .video-info {
    opacity: 1;
}

.video-info .venue {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
}

.video-info .caption {
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.9;
}

/* Like Button */
.like-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    opacity: 0;
    transition: all 0.2s ease;
}

.video-card:hover .like-button {
    opacity: 1;
}

.like-button:hover {
    background: rgba(0,0,0,0.7);
    transform: scale(1.1);
}

.like-button.liked {
    background: rgba(237, 73, 86, 0.8);
}

.like-icon {
    font-size: 18px;
    line-height: 1;
}

.likes-count {
    position: absolute;
    top: 50px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-card:hover .likes-count {
    opacity: 1;
}

/* Modal - Instagram Style */
#hotspot-video-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background-color: #000;
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.modal-video-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.modal-video-container video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
}

.modal-info {
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px;
    color: white;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background-color: rgba(255,255,255,0.1);
}

.modal-description {
    margin-bottom: 15px;
}

.modal-description p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.9;
}

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

.modal-actions .like-button {
    position: static;
    opacity: 1;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.modal-actions .like-button:hover {
    background: rgba(255,255,255,0.2);
}

.modal-actions .like-button.liked {
    background: rgba(237, 73, 86, 0.8);
}

.modal-actions .like-button.liked:hover {
    background: rgba(237, 73, 86, 1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hotspot-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .hotspot-latest-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
    }

    .video-card {
        padding-top: 100%;
    }

    .modal-content {
        width: 95%;
    }

    .modal-video-container {
        height: 200px;
    }

    .modal-info {
        padding: 15px;
    }
}

/* Loading States */
.video-card.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Play/Pause Icon Overlay */
.video-card::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-card:hover::after {
    opacity: 1;
}

.video-card.playing::after {
    content: '⏸';
    opacity: 0;
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .video-card::before,
    .video-card::after,
    .video-info,
    .like-button,
    .likes-count {
        opacity: 1;
    }
    
    .video-card:hover::before,
    .video-card:hover .video-info,
    .video-card:hover .like-button,
    .video-card:hover .likes-count {
        opacity: 1;
    }
}
