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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    min-height: 100vh;
    color: #fff;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.subtitle {
    text-align: center;
    color: #aaa;
    margin-bottom: 24px;
}

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

.tab {
    flex: 1;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #aaa;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
}

.tab.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: #6366f1;
    color: #fff;
}

.upload-section {
    display: none;
}

.upload-section.active {
    display: block;
}

.drop-zone {
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 48px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255,255,255,0.02);
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.drop-zone-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.drop-zone .small {
    color: #888;
    font-size: 0.85rem;
    margin-top: 8px;
}

.url-input-group {
    display: flex;
    gap: 8px;
}

.url-input-group input {
    flex: 1;
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 0.95rem;
    outline: none;
}

.url-input-group input:focus {
    border-color: #6366f1;
}

.btn-primary {
    padding: 14px 24px;
    border-radius: 12px;
    border: none;
    background: #6366f1;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #4f46e5;
}

.btn-primary:disabled {
    background: #555;
    cursor: not-allowed;
}

.progress-section {
    margin-top: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

#file-name-display {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

.progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: 4px;
    transition: width 0.3s;
}

.progress-details {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #aaa;
}

.result-section {
    margin-top: 20px;
}

.result-section h3 {
    text-align: center;
    margin-bottom: 16px;
    color: #34d399;
}

.link-item {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 8px;
    gap: 8px;
}

.link-item input {
    flex: 1;
    background: none;
    border: none;
    color: #ddd;
    font-size: 0.78rem;
    outline: none;
}

.btn-copy {
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    background: #6366f1;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.btn-copy:hover {
    background: #4f46e5;
}

.btn-copy.copied {
    background: #34d399;
}

.history-section {
    margin-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
}

.history-section h3 {
    margin-bottom: 12px;
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
}

.history-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #c4b5fd;
    word-break: break-all;
}

.history-item-time {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 8px;
}

.history-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-link-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-link-row input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 6px 8px;
    color: #bbb;
    font-size: 0.72rem;
    outline: none;
}

.history-link-row .btn-copy {
    padding: 4px 10px;
    font-size: 0.72rem;
}

.btn-danger {
    margin-top: 12px;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    cursor: pointer;
    font-size: 0.85rem;
    width: 100%;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

.empty-history {
    text-align: center;
    color: #666;
    padding: 20px;
}

.hidden {
    display: none !important;
}

.history-list::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-track {
    background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}
