body {
    background-color: #1a1a1a;
    color: #eee;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

#header {
    background-color: #2a2a2a;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #5865F2;
}

#header h1 {
    margin: 0;
    color: #5865F2;
}

#header h1 a {
    color: #5865F2;
    text-decoration: none;
}

#user-info {
    font-size: 0.9em;
}

#grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    padding: 20px;
}


.thumb-container {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 1/1;
    /* Square */
    background: #000;
}


.thumb-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.thumb-container:hover img {
    transform: scale(1.05);
}

.thumb-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 5px;
    font-size: 0.8em;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    flex-direction: column;
}

.thumb-container:hover .thumb-info {
    opacity: 1;
}

.thumb-info a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.tags-list {
    margin-top: 2px;
}

.tags-list .tag {
    font-size: 0.7em;
    padding: 1px 4px;
    margin-right: 2px;
}

/* Modal Player */
/* Modal Player */
#player-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow: hidden;
}

#player-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
}

#player-backdrop video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(20px);
    transform: scale(1.1);
}

#player-content-wrapper {
    position: relative;
    z-index: 1;
    /* Above backdrop */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90vw;
    height: 90vh;
    /* Fixed height */
    max-width: 1200px;
}

#player-content {
    flex: 1;
    /* Take remaining space */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    overflow: hidden;
    min-height: 0;
}

video {
    max-width: 100%;
    max-height: 100%;
    /* Fit container */
    width: auto;
    height: auto;
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.5);
    object-fit: contain;
}

/* Removed Sidebar styles */

#close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 1001;
}

/* Player Controls */
/* Player Controls */
#player-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    flex-shrink: 0;
    /* Prevent shrinking */
}

#player-controls button {
    background: #444;
    color: #fff;
    border: 1px solid #666;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    width: 100px;
    /* Fixed width */
}

#player-controls button:hover {
    background: #666;
}

/* Info Section (Tags, Age, etc) */
#player-info {
    text-align: center;
    color: #ccc;
    font-size: 0.9em;
    flex-shrink: 0;
    /* Prevent shrinking */
    padding-bottom: 10px;
    width: 100%;
}

#player-info p {
    margin: 5px 0;
}

#modal-tags {
    margin-top: 5px;
}

#tag-input-container {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}