/* style.css */

/* Base reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global layout */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: url('/siteresources/bg.png') center center / cover no-repeat fixed;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: #e5e7eb;
}

.page-wrapper {
    width: 100%;
}

/* Fixed top bar */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(24, 24, 27, 0.96); /* #18181b */
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #3f3f46;
    z-index: 1000;
}

.site-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f9fafb;
}

.nav-links {
    display: flex;
    gap: 10px;
    font-size: 13px;
}

.nav-links a {
    color: #e4e4e7;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.nav-links a:hover {
    background: #18181b;
    border-color: #52525b;
    color: #fafafa;
}

/* Content area under header */
.main-content {
    padding-top: 72px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 20px;
    padding-right: 20px;
}

.container {
    max-width: 500px;
    width: 100%;
    margin: 0 auto 40px;
}

/* Card-like panels */
.card,
.upload-card,
.preview-container {
    background: rgba(24, 24, 27, 0.96);
    border-radius: 20px;
    padding: 32px 32px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
    border: 1px solid #3f3f46;
}

.upload-card {
    padding: 40px 40px 24px;
}

/* Headings and text */
h1 {
    font-size: 26px;
    color: #f9fafb;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #a1a1aa;
    margin-bottom: 8px;
    font-size: 14px;
}

.max-size {
    text-align: center;
    color: #71717a;
    font-size: 14px;
    margin-bottom: 32px;
}

/* Shared footer */
.site-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #27272f;
    font-size: 12px;
    color: #a1a1aa;
    text-align: center;
}

/* Primary buttons */
.btn-primary,
.upload-btn,
.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 16px 16px;
    border-radius: 12px;
    border: 1px solid #1f51ff; /* neon-ish blue */
    cursor: pointer;
    background: #1f51ff;
    color: #f9fafb;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
}

.btn-primary:hover,
.upload-btn:hover,
.download-btn:hover {
    background: #335dff;
    border-color: #4d7bff;
    box-shadow: 0 0 16px rgba(31, 81, 255, 0.55);
    transform: translateY(-1px);
}

.upload-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Inputs & textareas */
input[type="text"],
input[type="email"],
input[type="file"],
textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #3f3f46;
    background: #18181b;
    color: #e5e7eb;
    font-size: 14px;
}

input::placeholder,
textarea::placeholder {
    color: #71717a;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #6366f1;
}

/* Hide native file input */
#fileInput {
    display: none;
}

/* Upload area */
.upload-area {
    border: 2px dashed #4b5563;
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    margin-bottom: 24px;
    background: #18181b;
}

.upload-area:hover {
    border-color: #818cf8;
    background: #18181b;
}

.upload-area.dragover {
    border-color: #818cf8;
    background: #18181b;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

/* File input label button */
.file-input-label {
    display: inline-block;
    padding: 12px 32px;
    background: #1f51ff;
    color: white;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #1f51ff;
    transition: transform 0.1s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
}

.file-input-label:hover {
    background: #335dff;
    border-color: #4d7bff;
    box-shadow: 0 0 14px rgba(31, 81, 255, 0.55);
    transform: translateY(-1px);
}

/* Selected file panel */
.file-selected {
    display: none;
    background: #18181b;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #3f3f46;
}

.file-selected.show {
    display: block;
}

.file-name {
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 6px;
    word-break: break-word;
}

.file-size {
    color: #a1a1aa;
    font-size: 14px;
}

/* Loading / spinner */
.loading {
    display: none;
    text-align: center;
    padding: 40px 0;
}

.loading.show {
    display: block;
}

.spinner {
    border: 4px solid #27272f;
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success link area */
.link-display {
    display: none;
    text-align: center;
    padding: 24px;
    background: #022c22;
    border-radius: 16px;
    margin-top: 24px;
    border: 1px solid #16a34a;
}

.link-display.show {
    display: block;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.link-text {
    color: #e5e7eb;
    margin-bottom: 16px;
}

.link-box {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.link-box input {
    flex: 1;
    padding: 12px;
    border: 1px solid #3f3f46;
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
    background: #111827;
    color: #e5e7eb;
}

/* Copy button */
.copy-btn {
    padding: 12px 24px;
    background: #111827;
    color: #e5e7eb;
    border: 1px solid #1f51ff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
}

.copy-btn:hover {
    background: #1f51ff;
    border-color: #4d7bff;
    color: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(31, 81, 255, 0.6);
}

.copy-btn.copied {
    background: #22c55e;
    border-color: #22c55e;
    color: #f9fafb;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

.expiry-info {
    font-size: 13px;
    color: #a1a1aa;
}

.expiry-time {
    color: #f97373;
    font-weight: 600;
}

/* Error message */
.error-message {
    display: none;
    margin-top: 20px;
    padding: 16px;
    background: #451a1a;
    border: 1px solid #b91c1c;
    border-radius: 12px;
    color: #fecaca;
}

.error-message.show {
    display: block;
}

/* Turnstile widget */
.cf-turnstile {
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
}

/* File preview specifics */
.preview-container {
    padding: 40px 40px 24px;
}

.file-icon {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 0 0, #6366f1, #18181b);
    border-radius: 16px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.album-art {
    width: 160px;
    height: 160px;
    margin: 0 auto 24px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.file-info {
    color: #a1a1aa;
    font-size: 14px;
    margin-bottom: 24px;
}

.file-details {
    background: #18181b;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #3f3f46;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #27272f;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #a1a1aa;
    font-size: 14px;
}

.detail-value {
    color: #e5e7eb;
    font-weight: 500;
    font-size: 14px;
}

/* Link container under preview */
.link-container {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: #111827;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #27272f;
}

.link-container input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #3f3f46;
    border-radius: 8px;
    font-size: 13px;
    color: #e5e7eb;
    background: #020617;
    font-family: monospace;
}

.link-container input:focus {
    outline: none;
    border-color: #6366f1;
}

.expiry-warning {
    margin-top: 16px;
    color: #f97373;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.secure-badge {
    margin-top: 16px;
    color: #a1a1aa;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Audio player styles (moved from inline in f.php) */
.audio-player {
    width: 100%;
    margin: 12px 0 18px;
}

/* Responsive tweaks */
@media (max-width: 600px) {
    .card,
    .upload-card,
    .preview-container {
        padding: 30px 20px 20px;
    }

    h1 {
        font-size: 22px;
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        height: auto;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .main-content {
        padding-top: 88px;
    }
}
