:root {
    --bg-color: #fafafa;
    --card-bg: #ffffff;
    --border-color: #eaeaea;
    --primary: #000000;
    --primary-hover: #333333;
    --text-main: #000000;
    --text-muted: #666666;
    --success: #0070f3;
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2.5rem;
    width: min(480px, 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.header {
    margin-bottom: 2rem;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.tab {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease;
    margin-bottom: -1px;
}

.tab:hover {
    color: var(--text-main);
}

.tab.active {
    color: var(--text-main);
    border-bottom-color: var(--text-main);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-input-wrapper {
    position: relative;
    width: 100%;
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: #fafafa;
    border: 1px dashed #ccc;
    border-radius: 6px;
    transition: border-color 0.15s ease;
    cursor: pointer;
}

.file-input:hover + .file-label {
    border-color: #888;
}

.file-input:focus + .file-label {
    border-color: var(--primary);
}

.file-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.submit-btn, .share-link-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.submit-btn:hover, .share-link-btn:hover {
    background: var(--primary-hover);
}

.share-link-btn {
    padding: 0.5rem 0.75rem;
}

/* HTMX Loader Styles */
.loader-wrapper {
    display: none;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.htmx-request.loader-wrapper {
    display: flex;
}
.htmx-request.submit-btn, .htmx-request .submit-btn {
    opacity: 0.5;
    pointer-events: none;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Result Box */
#result {
    margin-top: 1rem;
}

.success-message {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.success-message p {
    font-weight: 500;
    color: var(--text-main);
}

.share-input {
    flex: 1;
    background: #fafafa;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.share-input:focus {
    outline: none;
    border-color: #888;
}

/* Shares List */
.share-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.share-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-name {
    font-size: 0.875rem;
    font-weight: 500;
    word-break: break-all;
    max-width: 70%;
}

.share-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.share-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    animation: fadeout 4s forwards;
}

@keyframes fadeout {
    0% { opacity: 0; transform: translateY(10px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}
