/* SGO Losers Gallery Styles */
.sgo-losers-gallery {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.gallery-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.gallery-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-header p {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    opacity: 0.9;
}

.gallery-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-size: 0.9em;
}

.refresh-indicator {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e1e5e9;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gallery-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.item-media {
    position: relative;
    height: 200px;
    overflow: hidden;
    cursor: pointer;
}

.item-media img,
.item-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.item-media:hover img,
.item-media:hover video {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.item-media:hover .play-overlay {
    background: rgba(102, 126, 234, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.no-media {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
}

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px 15px 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.item-media:hover .item-overlay {
    transform: translateY(0);
}

.item-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
}

.item-info p {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    opacity: 0.9;
}

.timer {
    font-size: 0.8em;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 10px;
    display: inline-block;
}

.item-details {
    padding: 15px;
}

.item-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}

.player-name {
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
}

.game-name {
    color: #667eea;
    font-size: 0.9em;
}

.post-date {
    color: #666;
    font-size: 0.8em;
}

.item-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.attempts,
.duration {
    background: #f8f9fa;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    color: #666;
}

.item-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.comment-btn {
    background: #e8f4fd;
    color: #0066cc;
    border: 1px solid #bee5eb;
}

.comment-btn:hover {
    background: #d1ecf1;
}

.report-btn {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.report-btn:hover {
    background: #f5c6cb;
}

.no-content {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.5em;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    position: relative;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: #000;
    background: white;
}

.modal-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-media {
    flex: 1;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.modal-media img,
.modal-media video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-info {
    padding: 20px;
    background: white;
}

.modal-info h2 {
    margin: 0 0 15px 0;
    color: #333;
}

.modal-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.modal-meta span {
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    color: #666;
}

.modal-timer {
    margin-bottom: 15px;
}

.modal-timer span {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
}

.modal-description {
    color: #666;
    line-height: 1.6;
}

.modal-actions {
    padding: 15px 20px;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-actions .action-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-actions .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Report Modal */
#report-modal .modal-content {
    max-width: 500px;
}

#report-modal h2 {
    margin: 0 0 20px 0;
    padding: 20px 20px 0;
    color: #333;
}

#report-form {
    padding: 0 20px 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Comments Modal */
#comments-modal .modal-content {
    max-width: 600px;
}

#comments-modal h2 {
    margin: 0 0 20px 0;
    padding: 20px 20px 0;
    color: #333;
}

#comments-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 0 20px;
    margin-bottom: 20px;
}

.comment-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.comment-text {
    color: #666;
    line-height: 1.4;
}

.comment-date {
    font-size: 0.8em;
    color: #999;
    margin-top: 5px;
}

#comment-form {
    padding: 0 20px 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .gallery-header h1 {
        font-size: 2em;
    }

    .gallery-filters {
        gap: 5px;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .modal-body {
        flex-direction: column;
    }

    .modal-media {
        min-height: 250px;
    }

    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .sgo-losers-gallery {
        padding: 10px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-stats {
        flex-direction: column;
        gap: 10px;
    }

    .item-actions {
        flex-direction: column;
    }

    .action-btn {
        margin-bottom: 5px;
    }
}

/* Animation for new items */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item.new-item {
    animation: slideInUp 0.5s ease-out;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}