:root {
    /* Color Palette */
    --bg-dark: #0f111a;
    --card-bg: rgba(25, 28, 41, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --primary: #6d28d9;
    --primary-hover: #7c3aed;
    --secondary: #ec4899;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    padding: 2rem 1rem;
}

/* Dynamic Background Shapes */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite alternate ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: #3b82f6;
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Glassmorphism Container */
.app-container {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: all 0.3s ease;
}

header {
    margin-bottom: 2.5rem;
}

.gradient-text {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

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

/* Upload Section */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 3rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 1.5rem;
    position: relative;
}

.drop-zone:hover, .drop-zone.drag-active {
    border-color: var(--primary);
    background: rgba(109, 40, 217, 0.1);
}

.icon-container {
    color: var(--primary);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.drop-zone:hover .icon-container {
    transform: translateY(-5px);
}

.drop-zone h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

.file-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.file-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    animation: slideUp 0.3s ease forwards;
}

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

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

.file-info-header span {
    flex: 1;
    margin-left: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
}

.remove-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.loader-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

.success-icon-small {
    color: var(--success);
}

.error-text {
    color: var(--danger);
    font-size: 0.85rem;
    font-weight: 600;
}

.link-container-inline {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.3rem 0.5rem;
    margin-top: 0.75rem;
    align-items: center;
}

.link-container-inline input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 0.2rem 0.5rem;
    font-size: 0.9rem;
    outline: none;
}

.secondary-btn-small {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.secondary-btn-small:hover {
    background: var(--primary-hover);
}

/* Buttons */
.primary-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--border-color);
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Result Section */
.result-section {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.success-icon {
    width: 64px;
    height: 64px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.result-section h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.result-section p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.link-container {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    margin-bottom: 1.5rem;
}

.link-container input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 0.5rem 1rem;
    font-size: 1rem;
    outline: none;
}

.secondary-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.secondary-btn:hover {
    background: var(--primary-hover);
}

.text-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

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

.hidden {
    display: none !important;
}

/* Tabs */
.tabs-container {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* History */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.history-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.text-danger {
    color: var(--danger) !important;
}

.text-danger:hover {
    color: #fca5a5 !important;
}

.empty-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 0;
    font-style: italic;
}

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

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.2s linear;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}
