@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
    --bg: #0a0a0b;
    --surface: #141416;
    --surface-2: #1c1c1f;
    --border: #2a2a2e;
    --border-hover: #3a3a3f;
    --text: #e8e8ed;
    --text-dim: #8a8a95;
    --accent: #6c5ce7;
    --accent-glow: rgba(108, 92, 231, 0.3);
    --success: #00d2a0;
    --danger: #ff6b6b;
    --radius: 16px;
    --font: 'Space Grotesk', system-ui, sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 560px;
}

.logo {
    text-align: center;
    margin-bottom: 48px;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-dim) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 6px;
    letter-spacing: 0.02em;
}

/* Drop zone */
.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 64px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--surface);
    position: relative;
    overflow: hidden;
}

.dropzone::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: radial-gradient(circle at 50% 50%, var(--accent-glow), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dropzone:hover, .dropzone.drag-over {
    border-color: var(--accent);
    background: var(--surface-2);
}

.dropzone:hover::before, .dropzone.drag-over::before {
    opacity: 1;
}

.dropzone.drag-over {
    transform: scale(1.01);
}

.dropzone-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    opacity: 0.7;
    position: relative;
    z-index: 1;
}

.dropzone-text {
    position: relative;
    z-index: 1;
}

.dropzone-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.dropzone-text p {
    font-size: 0.8rem;
    color: var(--text-dim);
}

input[type="file"] { display: none; }

/* Upload progress */
.upload-area {
    margin-top: 24px;
}

.upload-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.upload-item .file-name {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-wrap {
    background: var(--surface-2);
    border-radius: 8px;
    height: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    border-radius: 8px;
    transition: width 0.15s linear;
}

.progress-bar.done {
    background: var(--success);
}

.upload-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: var(--mono);
}

/* Result link */
.result {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-link-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.result-link {
    flex: 1;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.82rem;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.copy-btn {
    background: var(--accent);
    border: none;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.copy-btn:hover { filter: brightness(1.15); }
.copy-btn:active { transform: scale(0.96); }

.copy-btn.copied {
    background: var(--success);
}

.result-meta {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* View page */
.view-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    width: 100%;
}

.view-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.view-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    word-break: break-all;
}

.view-header .meta {
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--text-dim);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.view-preview {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: var(--bg);
}

.view-preview img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    object-fit: contain;
}

.view-preview video {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    outline: none;
}

.view-preview audio {
    width: 100%;
    max-width: 400px;
}

.view-preview .file-icon-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px;
    color: var(--text-dim);
}

.view-preview .file-icon-preview span {
    font-size: 3rem;
}

.view-actions {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:active { transform: scale(0.96); }

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover { filter: brightness(1.15); }

.btn-secondary {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--surface);
}

.countdown {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-left: auto;
    font-family: var(--mono);
}

.expired-notice {
    text-align: center;
    padding: 64px 32px;
}

.expired-notice h2 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.expired-notice p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 480px) {
    body { padding: 16px; }
    .logo h1 { font-size: 2rem; }
    .dropzone { padding: 48px 20px; }
    .view-actions { flex-direction: column; }
    .countdown { margin-left: 0; margin-top: 4px; }
}
