body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding-top: 150px;
    padding-bottom: 50px;
    background-color: #1a2a4a;
    color: #e0e0e0;
}

.container {
    text-align: center;
    max-width: 1200px;
    width: 90%;
}

.container {
    background-color: #0f1b35; 
    padding: 24px;
    border-radius: 8px;
}

.search-bar {
    display: block;
    margin: 20px auto;
    padding: 10px 15px;
    font-size: 16px;
    border: 1px solid #3a5a7a;
    border-radius: 4px;
    width: 300px;
    background-color: #2a3a5a;
    color: #e0e0e0;
}

.search-bar::placeholder {
    color: #a0b0d0;
}

/* Media Grid */
.media-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
    transition: opacity 0.3s ease;
}

.media-card {
    background-color: #2a3a5a;
    border: 1px solid #3a5a7a;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, border-color 0.3s;
}

.media-card:hover {
    transform: translateY(-5px);
    border-color: #5a7aaa;
}

.media-preview {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.youtube-card {
    position: relative;
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
    pointer-events: none;
}

.file-icon {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background-color: #1a2a4a;
}

.card-info {
    padding: 18px;
}

.card-info h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
}

.tags {
    margin: 0;
    font-size: 13px;
}

.tag {
    display: inline-block;
    background-color: #3a5a7a;
    padding: 5px 10px;
    border-radius: 12px;
    margin: 4px;
}

/* Media Detail View */
.media-detail {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1a2a4a;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.back-btn {
    align-self: flex-start;
    background-color: #3a5a7a;
    color: #e0e0e0;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 20px;
}

.back-btn:hover {
    background-color: #5a7aaa;
}

.detail-content {
    display: flex;
    gap: 50px;
    max-width: 1200px;
    align-items: flex-start;
}

.detail-preview {
    max-width: 700px;
    max-height: 700px;
    width: 100%;
    object-fit: contain;
    aspect-ratio: 16/9;
    height: auto;
    border-radius: 8px;
}

.file-icon-large {
    font-size: 120px;
    width: 500px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2a3a5a;
    border-radius: 8px;
}

.detail-header {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 1200px;
    align-items: center;
    margin-bottom: 12px;
}


.detail-header .back-btn {
    align-self: center;
    margin-bottom: 0;
}

.download-btn {
    background-color: #2b5aa0;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.download-btn:hover {
    background-color: #3a6fc0;
}

.detail-info {
    flex: 1;
    text-align: left;
}

.detail-info h2 {
    margin-top: 0;
    font-size: 28px;
}

.description {
    font-size: 16px;
    line-height: 1.6;
    margin: 20px 0;
}

.tags-section,
.credits-section {
    margin: 20px 0;
    padding: 15px;
    background-color: #2a3a5a;
    border-radius: 4px;
}

.credits-section p {
    margin: 8px 0;
}

/* Utilities */
.hidden {
    display: none !important;
}

.no-results {
    font-size: 18px;
    color: #a0b0d0;
    padding: 40px;
}

@media (max-width: 768px) {
    .detail-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .detail-preview,
    .file-icon-large {
        max-width: 100%;
        width: 100%;
    }
}
