@import url("https://dsans.davm.dev/font.css");
@import url("https://davm.dev/fonts/finder/font.css");

:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --background-color: #f0f2f5;
    --card-background: #ffffff;
    --text-color: #333;
    --light-text-color: #777;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --error-color: #f44336;

    /* Glassmorphism theme variables for other pages */
    --text-color-light: #ffffff;
    --button-text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --card-hover-bg: rgba(255, 255, 255, 0.14);
}

h1, h2, h3, h4, h5, h6, .upload-area-text {
    font-family: 'DSans', sans-serif;
}

body, button, input, select, textarea, .button {
    font-family: 'Finder', sans-serif;
}

body {
    margin: 0;
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--background-color);
    color: var(--text-color);
    box-sizing: border-box;
    overflow-y: auto !important;
}

/* Glassmorphism pages styling override */
body.glass-theme {
    background-color: transparent;
    color: var(--text-color-light);
}

.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    pointer-events: none;
}

.shape {
    position: absolute;
    display: block;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
}
.shape1 { width: 220px; height: 220px; top: 8%; left: 12%; animation-duration: 25s; }
.shape2 { width: 120px; height: 120px; top: 72%; left: 8%; animation-duration: 18s; }
.shape3 { width: 170px; height: 170px; top: 20%; left: 82%; animation-duration: 22s; }
.shape4 { width: 60px; height: 60px; top: 82%; left: 78%; animation-duration: 14s; }

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

/* --- Main Content Card (Upload Page) --- */
.container {
    width: 90%;
    max-width: 500px;
    background-color: var(--card-background);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
    z-index: 1;
    position: relative;
}

.logo {
    max-width: 150px;
    margin-bottom: 20px;
}

p {
    color: var(--light-text-color);
    margin-bottom: 30px;
}

/* --- Upload Area --- */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 15px;
    padding: 40px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    box-sizing: border-box;
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background-color: #f8f5ff;
}

.upload-area-icon {
    font-size: 48px;
    margin-bottom: 10px;
    font-family: 'Noto Color Emoji', 'Twemoji', 'Twemoji Mozilla', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
}

.upload-area-subtext {
    color: var(--light-text-color);
    font-size: 14px;
}

#file-name {
    margin-top: 20px;
    font-weight: 500;
}

.progress-container {
    display: none;
    width: 100%;
    background-color: #f3f3f3;
    border-radius: 5px;
    margin-top: 20px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 10px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    transition: width 0.4s ease;
}

.download-section {
    display: none;
    margin-top: 20px;
}

.download-link-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #f9f9f9;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px;
    margin-top: 10px;
    overflow-x: auto;
}

#sharing-link {
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
}

.button, #copy-button {
    background: var(--secondary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.button:hover, #copy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 117, 252, 0.4);
}

/* --- Expiration --- */
.expiration-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: var(--light-text-color);
}
#expiration-select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

/* --- Messages & Footer --- */
.message {
    margin-top: 20px;
    font-weight: 500;
}
.message.success { color: var(--success-color); }
.message.error { color: var(--error-color); }

footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

footer .privacy-notice {
    font-size: 12px;
    color: #888;
}

footer .privacy-notice:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Privacy Policy Page Styles
   ========================================================================== */
.privacy-container {
    width: 100%;
    max-width: 850px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    padding: 3.5rem 3rem;
    box-sizing: border-box;
    animation: fade-in 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.privacy-container h1 {
    font-size: 2.2rem;
    font-weight: 600;
    text-align: center;
    margin: 0 0 1rem 0;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin-bottom: 3rem;
    font-weight: 300;
}

.policy-grid {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    margin-bottom: 3rem;
}

.policy-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.policy-card:hover {
    background: var(--card-hover-bg);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 2.2rem;
    font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
    background: rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #ffffff;
}

.card-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 300;
}

.card-content strong {
    color: #ffffff;
    font-weight: 500;
}

a.contact-link {
    color: #38ef7d;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dashed rgba(56, 239, 125, 0.5);
    transition: all 0.2s ease;
}

a.contact-link:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

.footer-action {
    display: flex;
    justify-content: center;
}

.privacy-container .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-color-light);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 14px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(5px);
}

.privacy-container .button:hover {
    background: #ffffff;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.35);
}

.privacy-container .button svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .privacy-container {
        padding: 2.5rem 1.8rem;
    }
    .policy-card {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }
    .card-icon {
        width: 50px;
        height: 50px;
        min-width: 50px;
        font-size: 1.8rem;
    }
    .privacy-container h1 {
        font-size: 1.8rem;
    }
}

/* ==========================================================================
   Preview Page Styles
   ========================================================================= */
.preview-container {
    width: 100%;
    max-width: 800px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    padding: 3rem 2.5rem;
    text-align: center;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-header {
    width: 100%;
    margin-bottom: 2rem;
}

.file-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    word-break: break-all;
}

.file-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

.media-content {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}

img.preview-media {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    object-fit: contain;
    background: rgba(0, 0, 0, 0.05);
    padding: 6px;
}

video.preview-media {
    width: 100%;
    max-height: 60vh;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    outline: none;
    background: #0b0b0f;
}

.audio-card {
    width: 100%;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.1), 0 10px 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    box-sizing: border-box;
}

.audio-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
    animation: pulse-glow 2.5s infinite ease-in-out;
}

@keyframes pulse-glow {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.2); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px 5px rgba(255, 255, 255, 0.1); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.2); }
}

audio {
    width: 100%;
    outline: none;
}

.generic-file-card {
    width: 100%;
    padding: 3rem 2rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    box-sizing: border-box;
}

.generic-icon-wrapper {
    font-size: 4.5rem;
    font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.generic-message {
    font-size: 1.1rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    width: 100%;
}

.button-primary {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(56, 239, 125, 0.3);
}

.button-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(56, 239, 125, 0.5);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    color: var(--button-text-color);
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
}

.preview-container .button svg {
    width: 20px;
    height: 20px;
}

.preview-container .button:active {
    transform: translateY(1px);
}

@media (max-width: 600px) {
    .preview-container {
        padding: 2rem 1.5rem;
    }
    .file-title {
        font-size: 1.3rem;
    }
    .preview-container .button {
        width: 100%;
        box-sizing: border-box;
    }
    .button-container {
        flex-direction: column;
        gap: 0.8rem;
    }
}

/* ==========================================================================
   404 Page Styles
   ========================================================================== */
.error-container {
    width: 100%;
    max-width: 550px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    padding: 3.5rem 2.5rem;
    text-align: center;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: scale-up 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes scale-up {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.error-code {
    font-size: 6.5rem;
    font-weight: 700;
    line-height: 1;
    margin: 0 0 1rem;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15));
}

.error-graphic {
    font-size: 4rem;
    font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
    margin-bottom: 1.5rem;
    animation: bounce 3s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.error-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #ffffff;
}

.error-message {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 2.5rem 0;
}

.error-container .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-color-light);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(5px);
}

.error-container .button:hover {
    background: #ffffff;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.35);
}

.error-container .button svg {
    width: 20px;
    height: 20px;
}

.error-container .button:active {
    transform: translateY(1px);
}

@media (max-width: 480px) {
    .error-container {
        padding: 2.5rem 1.5rem;
    }
    .error-code {
        font-size: 5rem;
    }
    .error-title {
        font-size: 1.3rem;
    }
    .error-container .button {
        width: 100%;
        box-sizing: border-box;
    }
}
