@font-face {
    /* font-family: '0xProto Nerd Font'; */
    /* src: url('../fonts/0xProtoNerdFont-Regular.ttf') format('truetype'); */
    font-weight: normal;
    font-style: normal;
}

:root {
    --background-color: black;
    --text-color: white;
    --primary-color: #D4A5A5;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    /* font-family: '0xProto Nerd Font', sans-serif; */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
}

.main-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.file-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: 10px;
}

.file-item {
    width: 100%;
    display: flex;
    justify-content: center;
}

.media-wrapper {
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.file-header { /* Specific styling for file-header within download-item */
    padding-bottom: 0.1rem;
    padding-left: 1rem;
}

.file-header p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-top: 15px;
}

.media-wrapper img,
.media-wrapper video,
.media-wrapper audio {
    margin-top: 0.5rem;
    max-width: 100%;
    height: auto;
    display: block;
}

.download-item {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.download-item .file-header { /* Specific styling for file-header within download-item */
    padding-top: 0.5rem;
}
.download-button {
    display: block;
    background-color: var(--primary-color);
    color: black;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    margin-top: 0.5rem;
}

.download-button:hover {
    color: white;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--primary-color);
    margin-bottom: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 1rem;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-link {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
}

.header-link:hover {
    text-decoration: underline;
}

.desktop-hint {
    color: var(--text-color);
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .desktop-hint {
        display: none;
    }
    /* .page-header { */
        /* flex-direction: column; */
        /* gap: 0.5rem; */
    /* } */
}

/* Styling for loading text */
.loading-text {
    display: none;
    text-align: center;
    padding: 2rem;
    font-size: 1rem;
}

/* Media loading placeholder */
.media-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 75px;
    height: 75px;
}

/* Spinner animation */
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(212, 165, 165, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Media error state */
.media-error {
    color: #999;
    font-size: 0.9rem;
    padding: 1rem;
}

.media-error-temp {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 75px;
    height: 75px;
    color: #999;
    font-size: 0.9rem;
}

.media-error-final {
    padding: 1rem;
    text-align: center;
    color: #AAA;
}

.media-error-final p {
    margin: 0 0 0.5rem 0;
}


.sub-header {
    display: grid;
    grid-template-areas:
        "date report"
        "stats stats"
        "views views";
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.2rem 1rem;
    padding-bottom: 1rem;
    color: #AAA;
    padding-left: 1rem;
    padding-right: 1rem;
}

.upload-date {
    grid-area: date;
    font-size: 0.9rem;
}

#report-abuse-button {
    grid-area: report;
    background-color: #333;
    color: #AAA;
    padding: 0.2rem 0.5rem;
    border: 1px solid #555;
    border-radius: 4px;
    text-decoration: none; /* Override .header-link underline */
    cursor: pointer;
    font-size: 0.7rem;
}

#report-abuse-button:hover {
    background-color: #444;
}

.file-stats-top {
    grid-area: stats;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #AAA;
}

.file-stats-bottom {
    grid-area: views;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #AAA;
}

.file-stats-top .separator,
.file-stats-bottom .separator {
    color: #666;
}

.controls-section {
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    padding: 1rem 3rem 1rem 1rem; /* Adjusted padding-right for delete button */
    position: relative; /* Establish positioning context */
    display: flex;
    flex-direction: row;
    align-items: center;
    column-gap: 2rem; /* Increased horizontal gap */
    row-gap: 1rem; /* Maintain vertical gap */
    flex-wrap: wrap;
    margin-left: 1rem;
    margin-right: 1rem;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.toggle-label:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-input:checked + .toggle-label {
    background-color: var(--primary-color);
}

.toggle-input:checked + .toggle-label:before {
    transform: translateX(20px);
}

.toggle-text-container {
    display: flex;
    align-items: center;
}

.toggle-text-public, .toggle-text-private {
    font-size: 0.9rem;
}

.short-url-display {
    background-color: #333;
    padding: 0.5rem;
    border-radius: 5px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.short-url-display .short-url-text {
    color: var(--primary-color);
    cursor: pointer;
}

.copy-message {
    font-size: 0.8rem;
    color: #888;
    display: none;
}

.delete-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: absolute; /* Position absolutely within controls-section */
    top: 1rem; /* Align with top padding */
    right: 1rem; /* Align with right padding */
}

.delete-button .lucide-x {
    color: #AAA;
}

.delete-button:hover .lucide-x {
    color: #ff4d4d;
}
