:root {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --card-bg: #ffffff;
    --primary: #4f46e5;
    /* Indigo */
    --primary-hover: #4338ca;
    --secondary: #e2e8f0;
    --secondary-text: #64748b;
    --border-color: #e2e8f0;
    --error-color: #ef4444;
    --success-color: #22c55e;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.theme-dark {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --card-bg: #1e293b;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --secondary: #334155;
    --secondary-text: #94a3b8;
    --border-color: #334155;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--primary), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.icon-btn:hover {
    background-color: var(--secondary);
}

/* Main Home */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--secondary-text);
}

/* Upload Widget */
.upload-widget {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s;
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 0.8rem;
    padding: 3rem 2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.05);
}

.drop-zone .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.drop-zone .limits {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--secondary-text);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.1s, opacity 0.2s;
}

.btn:active {
    transform: scale(0.98);
}

.btn.primary {
    background-color: var(--primary);
    color: white;
}

.btn.primary:hover {
    background-color: var(--primary-hover);
}

.btn.secondary {
    background-color: var(--secondary);
    color: var(--text-color);
}

.btn.text-only {
    background: none;
    color: var(--primary);
}

.btn.large {
    width: 100%;
    text-align: center;
}

/* Progress */
.upload-progress-container {
    margin-top: 2rem;
    text-align: left;
}

.file-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.progress-bar-track {
    background-color: var(--secondary);
    border-radius: 1rem;
    height: 8px;
    overflow: hidden;
}

.progress-bar-fill {
    background-color: var(--primary);
    height: 100%;
    width: 0%;
    transition: width 0.1s linear;
}

/* Result */
.upload-result {
    padding: 2rem 0;
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.link-box {
    display: flex;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.link-box input {
    flex: 1;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-family: monospace;
}

/* Download Page & File Card */
.download-page {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.file-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    text-align: center;
    box-shadow: var(--shadow);
}

.file-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.filename {
    font-size: 1.25rem;
    word-break: break-all;
    margin-bottom: 2rem;
}

.file-meta {
    background: var(--bg-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: left;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.meta-item:last-child {
    border-bottom: none;
}

.meta-item .label {
    color: var(--secondary-text);
    font-size: 0.9rem;
}

.meta-item .value {
    font-weight: 500;
    font-family: monospace;
}

.error-container {
    text-align: center;
}

.error-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

/* Footer */
footer {
    margin-top: auto;
    text-align: center;
    padding-top: 2rem;
    color: var(--secondary-text);
    font-size: 0.875rem;
}

footer a {
    color: var(--text-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    .link-box {
        flex-direction: column;
    }

    .hero h1 {
        font-size: 2rem;
    }
}

/* Additions for new features */
.font-bold {
    font-weight: 700;
}

.upload-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--secondary-text);
    font-family: monospace;
}

/* Success Card */
.success-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon-large {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.file-summary {
    background: var(--bg-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1.5rem 0;
    text-align: left;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row .label {
    color: var(--secondary-text);
    font-size: 0.9rem;
}

.summary-row .value {
    font-weight: 600;
    font-family: monospace;
}

.link-box-group label {
    display: block;
    text-align: left;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.btn.full-width {
    width: 100%;
}