@font-face {
    font-family: 'Lexend';
    src: url('/assets/lexend/Lexend-Regular.ttf') format('truetype');
    font-weight: 400;
}
@font-face {
    font-family: 'Lexend';
    src: url('/assets/lexend/Lexend-Medium.ttf') format('truetype');
    font-weight: 500;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Lexend', sans-serif;
    font-weight: 400;
    background-color: #1e1e2e;
    background-image: radial-gradient(#313244 2px, transparent 2px), radial-gradient(#313244 2px, transparent 2px);
    background-size: 32px 32px;
    background-position: 0 0, 16px 16px;
    color: #cdd6f4;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
a {
    color: #cba6f7;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
.wrapper {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
nav {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
nav .brand {
    font-weight: 400;
    font-size: 1rem;
    color: #cba6f7;
}
nav .links {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
nav .links a {
    color: #a6adc8;
    font-size: 0.85rem;
}
nav .links a:hover {
    color: #cdd6f4;
    text-decoration: none;
}
.container {
    padding: 0 1.25rem 2rem;
    flex: 1;
}
.card {
    background: #181825;
    border: 1px solid #313244;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
}
input[type="text"],
input[type="password"],
input[type="number"],
select {
    background: #313244;
    border: 1px solid #45475a;
    border-radius: 4px;
    color: #cdd6f4;
    padding: 0.45rem 0.65rem;
    font-family: 'Lexend', sans-serif;
    font-size: 0.85rem;
    width: 100%;
}
input:focus, select:focus {
    outline: 1px solid #cba6f7;
    border-color: #cba6f7;
}
label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    color: #a6adc8;
}
.form-group {
    margin-bottom: 0.85rem;
}
button, .btn {
    font-family: 'Lexend', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    padding: 0.45rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    color: #11111b;
}
.btn-primary {
    background: #cba6f7;
    color: #11111b;
}
.btn-danger {
    background: #f38ba8;
    color: #11111b;
}
.btn-secondary {
    background: #45475a;
    color: #cdd6f4;
}
.btn-icon {
    padding: 0.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.expires-presets {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-top: 0.3rem;
}
.preset-btn {
    background: #313244;
    color: #a6adc8;
    font-size: 0.75rem;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: 'Lexend', sans-serif;
    font-weight: 400;
}
.preset-btn:hover {
    background: #45475a;
}
.preset-btn.active {
    background: #cba6f7;
    color: #11111b;
    border-color: #cba6f7;
}
.custom-expires {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
}
.custom-expires input[type="number"] {
    width: 80px;
    font-size: 0.8rem;
    padding: 0.25rem 0.4rem;
}
.thumb-wrap {
    width: 80px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
    background: #181825;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.thumb-wrap canvas,
.thumb-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.thumb-wrap canvas {
    display: none;
}
.thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.thumb-placeholder {
    border: 1px solid #313244;
}
.error-msg {
    background: #313244;
    border: 1px solid #f38ba8;
    border-radius: 4px;
    color: #f38ba8;
    padding: 0.45rem 0.65rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}
.success-msg {
    background: #313244;
    border: 1px solid #a6e3a1;
    border-radius: 4px;
    color: #a6e3a1;
    padding: 0.45rem 0.65rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}
.video-player {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #11111b;
    position: relative;
    border: 1px solid #313244;
}
.video-player video,
.video-player img {
    width: 100%;
    display: block;
}
.video-player:fullscreen {
    display: flex;
    flex-direction: column;
    background: #000;
}
.video-player:fullscreen video {
    flex: 1;
    object-fit: contain;
}
.video-player:fullscreen .custom-controls {
    flex-shrink: 0;
}
.custom-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    background: #181825;
    border-top: 1px solid #313244;
}
.custom-controls button {
    background: none;
    border: none;
    color: #bac2de;
    cursor: pointer;
    padding: 0.15rem;
    font-size: 0.85rem;
    line-height: 1;
    display: flex;
    align-items: center;
}
.custom-controls button:hover {
    color: #cdd6f4;
}
.custom-controls button svg {
    width: 16px;
    height: 16px;
}
.seek-bar, .vol-bar {
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    border-radius: 3px;
    background: #313244;
    outline: none;
    cursor: pointer;
    transition: height 0.15s ease;
}
.seek-bar:hover, .vol-bar:hover {
    height: 7px;
}
.seek-bar {
    flex: 1;
}
.vol-bar {
    width: 60px;
}
.seek-bar::-webkit-slider-thumb, .vol-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cba6f7;
    cursor: pointer;
    box-shadow: 0 0 0 2px #181825;
    transition: transform 0.1s ease;
}
.seek-bar::-webkit-slider-thumb:hover, .vol-bar::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}
.seek-bar::-moz-range-thumb, .vol-bar::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cba6f7;
    border: 2px solid #181825;
    cursor: pointer;
}
.seek-bar::-moz-range-track, .vol-bar::-moz-range-track {
    background: #313244;
    height: 5px;
    border-radius: 3px;
}
.seek-bar::-moz-range-progress, .vol-bar::-moz-range-progress {
    background: #cba6f7;
    height: 5px;
    border-radius: 3px;
}
.time-display {
    font-size: 0.7rem;
    color: #6c7086;
    font-family: 'Lexend', sans-serif;
    white-space: nowrap;
    min-width: fit-content;
}
.audio-player {
    background: #181825;
    border: 1px solid #313244;
    border-radius: 8px;
    padding: 0.65rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.audio-player button {
    background: none;
    border: none;
    color: #bac2de;
    cursor: pointer;
    padding: 0.15rem;
    display: flex;
    align-items: center;
}
.audio-player button:hover {
    color: #cdd6f4;
}
.audio-player button svg {
    width: 16px;
    height: 16px;
}
.audio-player .seek-bar {
    flex: 1;
}
.audio-player .time-display {
    font-size: 0.7rem;
    color: #6c7086;
}
.meta-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.meta-tag {
    background: #313244;
    color: #a6adc8;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
}
.file-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.file-card {
    background: #181825;
    border: 1px solid #313244;
    border-radius: 8px;
    overflow: hidden;
}
.file-card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #11111b;
    overflow: hidden;
    position: relative;
}
.file-card-thumb video,
.file-card-thumb canvas,
.file-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.file-card-thumb canvas {
    display: none;
}
.thumb-placeholder-lg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #45475a;
}
.file-card-info {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.file-card-name {
    color: #cdd6f4;
    font-size: 0.85rem;
    text-decoration: none;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-card-name:hover {
    color: #cba6f7;
}
.file-card-meta {
    display: flex;
    gap: 0.5rem;
    color: #6c7086;
    font-size: 0.7rem;
    flex-shrink: 0;
}
.file-card-delete {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}
.file-card {
    position: relative;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 400;
    color: #6c7086;
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid #313244;
}
td {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
    border-bottom: 1px solid #313244;
    color: #bac2de;
}
td a {
    color: #cdd6f4;
}
.upload-area {
    border: 2px dashed #45475a;
    border-radius: 6px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    position: relative;
}
.upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.upload-area p {
    color: #a6adc8;
    font-size: 0.85rem;
}
.progress-bar {
    width: 100%;
    height: 6px;
    background: #313244;
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: #cba6f7;
    border-radius: 3px;
    transition: width 0.15s ease;
}
h1 {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    color: #cdd6f4;
}
h2 {
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #cdd6f4;
}
.share-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #313244;
    border-radius: 4px;
    padding: 0.35rem 0.5rem;
    margin-bottom: 0.75rem;
}
.share-row input {
    flex: 1;
    background: transparent;
    border: none;
    color: #bac2de;
    font-family: 'Lexend', sans-serif;
    font-size: 0.8rem;
}
.share-row input:focus {
    outline: none;
}
.share-row button {
    background: #45475a;
    border: none;
    color: #cdd6f4;
    border-radius: 3px;
    padding: 0.2rem 0.45rem;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: 'Lexend', sans-serif;
}
.actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.card-divider {
    border: none;
    border-top: 1px solid #313244;
    margin: 0.75rem 0;
}
.rename-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}
.rename-row input[type="text"] {
    flex: 1;
}
.rename-row .btn {
    flex-shrink: 0;
}
.delete-row {
    display: flex;
}
.delete-row .btn {
    width: 100%;
}
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #a6adc8;
    font-size: 0.85rem;
}
.empty-state a {
    color: #cba6f7;
}
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.page-header h1 {
    margin-bottom: 0;
}
.page-header a {
    font-size: 0.8rem;
}
.filename {
    color: #cdd6f4;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
