/* Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --accent: #6495ED;
    --accent-hover: #4169E1;
    --accent-glow: rgba(100, 149, 237, 0.4);
    --success: #10b981;
}

/* Custom Cursor */
body {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="white" opacity="0.9"><circle cx="10" cy="10" r="2"/></svg>') 10 10, auto;
}

a, button, input[type="file"], .upload-area, .file-item-remove, .copy-btn, .action-btn, .nav-btn, .footer-link, .logo {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><defs><linearGradient id="grad" x1="0%25" y1="0%25" x2="100%25" y2="100%25"><stop offset="0%25" style="stop-color:%236495ED;stop-opacity:1" /><stop offset="100%25" style="stop-color:%234169E1;stop-opacity:1" /></linearGradient></defs><circle cx="10" cy="10" r="4" fill="url(%23grad)"/><circle cx="10" cy="10" r="5.5" fill="none" stroke="white" stroke-width="1" opacity="0.5"/></svg>') 10 10, pointer !important;
}

input, textarea, select {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><line x1="10" y1="4" x2="10" y2="16" stroke="white" stroke-width="2"/></svg>') 10 10, text !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: 10px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent));
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(255, 255, 255, 0.02);
}

/* Body & Background */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Breathing gradient background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 40%, rgba(100, 149, 237, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(65, 105, 225, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(100, 149, 237, 0.03) 0%, transparent 60%);
    animation: breathe 12s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.05) rotate(1deg);
        opacity: 0.7;
    }
}

/* Floating orbs */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
    animation: float 25s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #6495ED, #4169E1);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #4169E1, #6495ED);
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Ensure content above background */
header, main, footer {
    position: relative;
    z-index: 1;
}

/* Header */
header {
    padding: 24px 40px;
    backdrop-filter: blur(20px);
    background: transparent;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px var(--accent-glow);
}

.logo-icon svg {
    width: 20px;
    height: 20px;
    stroke: white;
    stroke-width: 2.5;
}

.header-nav {
    display: flex;
    gap: 8px;
}

.nav-btn {
    padding: 10px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-decoration: none;
}

.nav-btn:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Main */
main {
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 24px;
}

/* Page Title */
.page-title {
    text-align: center;
    margin-bottom: 40px;
}

.page-title h1 {
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    background: linear-gradient(to bottom, #ffffff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-title p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    transition: all 0.3s ease;
    font-family: inherit;
    text-decoration: none;
}

.btn i {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--accent-glow);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--glass-hover);
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: 20px;
    padding: 48px 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.02);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(100, 149, 237, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-area:hover {
    border-color: rgba(100, 149, 237, 0.5);
    background: var(--glass-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(100, 149, 237, 0.2);
}

.upload-area.dragover {
    border-color: rgba(100, 149, 237, 0.7);
    background: var(--glass-hover);
    transform: scale(1.02);
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: var(--glass-bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.upload-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--text-secondary);
    stroke-width: 2;
}

.upload-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.upload-subtext {
    font-size: 14px;
    color: var(--text-tertiary);
}

#fileInput {
    display: none;
}

/* File Display */
.file-display {
    display: none;
    margin-top: 24px;
}

.file-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    margin-bottom: 16px;
}

.file-icon-large {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.file-icon-large i {
    width: 24px;
    height: 24px;
    color: white;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* Options */
.options-section {
    margin-top: 24px;
    padding: 24px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.options-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.options-title i {
    width: 16px;
    height: 16px;
}

.option-group {
    margin-bottom: 16px;
}

.option-group:last-child {
    margin-bottom: 0;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.option-label i {
    width: 16px;
    height: 16px;
}

.option-input,
.option-select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s;
}

.option-input:focus,
.option-select:focus {
    border-color: rgba(100, 149, 237, 0.5);
    background: rgba(0, 0, 0, 0.5);
}

.option-input::placeholder {
    color: var(--text-tertiary);
}

/* Progress */
.progress-container {
    display: none;
    margin-top: 24px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    width: 0%;
    transition: width 0.4s ease;
    box-shadow: 0 0 20px var(--accent-glow);
}

.progress-text {
    text-align: center;
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* Result */
.result-container {
    display: none;
    margin-top: 24px;
}

.success-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.success-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--success), #059669);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.success-icon i {
    width: 22px;
    height: 22px;
    color: white;
}

.success-text h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.success-text p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Info Pills */
.info-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
}

.pill svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
}

/* Link Section */
.link-section {
    margin-bottom: 16px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.link-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.link-box {
    display: flex;
    gap: 8px;
}

.link-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Monaco', monospace;
    color: var(--text-primary);
    outline: none;
}

.copy-btn {
    padding: 10px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn i {
    width: 18px;
    height: 18px;
    color: var(--text-primary);
}

.copy-btn:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

.copy-btn.copied {
    background: linear-gradient(135deg, var(--success), #059669);
    border-color: var(--success);
}

.copy-btn.copied i {
    color: white;
}

/* Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.action-btn {
    padding: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: var(--glass-hover);
    border-color: rgba(100, 149, 237, 0.5);
    color: var(--text-primary);
}

.action-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
}

.action-btn i {
    width: 16px;
    height: 16px;
}

/* QR Code */
.qr-container {
    display: none;
    text-align: center;
    padding: 24px;
    background: white;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-top: 16px;
}

.qr-container #qrCanvas {
    display: inline-block;
}

.qr-container img {
    border-radius: 8px;
}

/* Multiple Files */
.file-list {
    display: none;
    margin-top: 16px;
    max-height: 240px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    margin-bottom: 8px;
    backdrop-filter: blur(10px);
}

.file-item-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-item-icon i {
    width: 18px;
    height: 18px;
    color: white;
}

.file-item-info {
    flex: 1;
    min-width: 0;
}

.file-item-name {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item-size {
    font-size: 12px;
    color: var(--text-tertiary);
}

.file-item-remove {
    padding: 6px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    transition: all 0.3s;
}

.file-item-remove:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

.file-item-remove svg {
    width: 14px;
    height: 14px;
    stroke: #ef4444;
    stroke-width: 2;
}

.file-item-remove i {
    width: 14px;
    height: 14px;
    color: #ef4444;
}

/* Preview Modal */
.preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.preview-modal.active {
    display: flex;
}

.preview-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.preview-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.preview-content iframe {
    width: 80vw;
    height: 80vh;
    border: none;
    border-radius: 12px;
    background: white;
}

.preview-close {
    position: absolute;
    top: -50px;
    right: 0;
    padding: 12px 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    backdrop-filter: blur(10px);
    font-weight: 600;
    transition: all 0.3s;
}

.preview-close:hover {
    background: var(--glass-hover);
}

/* Footer */
footer {
    padding: 40px 24px;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 120px;
}

.footer-text {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.footer-link {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 640px) {
    main {
        padding: 40px 16px;
    }

    .glass-card {
        padding: 28px;
    }

    .link-box {
        flex-direction: column;
    }

    .copy-btn {
        width: 100%;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }

    .header-nav {
        display: none;
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

/* File list scrollbar */
.file-list::-webkit-scrollbar {
    width: 6px;
}

.file-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.file-list::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px;
}