:root {
    --primary: #000000;
    --primary-dark: #1a1a1a;
    --secondary: #333333;
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border: #e0e0e0;
    --border-light: #f0f0f0;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-md: rgba(0, 0, 0, 0.12);
    --shadow-lg: rgba(0, 0, 0, 0.16);
    --success: #000000;
    --error: #000000;
    --radius: 8px;
    --radius-lg: 12px;
}

[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #707070;
    --border: #1a1a1a;
    --border-light: #0f0f0f;
    --shadow: rgba(255, 255, 255, 0.03);
    --shadow-md: rgba(255, 255, 255, 0.05);
    --shadow-lg: rgba(255, 255, 255, 0.08);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

.navbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px var(--shadow);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.icon-btn, .menu-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 0.625rem;
    border-radius: 10px;
    color: var(--text-primary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover, .menu-btn:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.theme-icon {
    transition: all 0.3s ease;
}

.moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

.menu-btn {
    flex-direction: column;
    gap: 4px;
    padding: 0.5rem;
    width: 42px;
    height: 42px;
}

.menu-btn span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: var(--bg-primary);
    box-shadow: -4px 0 20px var(--shadow-lg);
    transition: right 0.3s ease;
    z-index: 200;
    padding: 2rem;
}

.sidebar.active {
    right: 0;
}

.sidebar-content h3 {
    margin-bottom: 2rem;
    color: var(--primary);
    font-size: 1.25rem;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sidebar-menu a:hover {
    background: var(--bg-secondary);
    transform: translateX(4px);
}

.sidebar-menu svg {
    opacity: 0.7;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 150;
    backdrop-filter: blur(4px);
}

.overlay.active {
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.hero {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    color: var(--text-primary);
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.upload-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 4px 20px var(--shadow-md);
    margin-bottom: 3rem;
    border: 1px solid var(--border);
}

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    background: var(--bg-secondary);
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--primary);
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.upload-icon-wrapper {
    display: inline-flex;
    padding: 1.5rem;
    background: var(--primary);
    border-radius: 20px;
    margin-bottom: 1.5rem;
}

.upload-icon {
    color: white;
}

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

.drop-zone p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.file-limit {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--bg-tertiary);
    border-radius: 50px;
    font-size: 0.813rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.divider span {
    position: relative;
    background: var(--bg-primary);
    padding: 0 1rem;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    font-weight: 600;
}

.url-upload h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.url-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.url-input-group svg:first-child {
    color: var(--text-tertiary);
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.url-input-group input {
    flex: 1;
    padding: 0.75rem 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
}

.url-input-group input::placeholder {
    color: var(--text-tertiary);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.upload-progress {
    display: none;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px var(--shadow-md);
    border: 1px solid var(--border);
}

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

.progress-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

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

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

.progress-content p {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.result-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

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

.result-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    box-shadow: 0 4px 20px var(--shadow-md);
    border: 1px solid var(--border);
}

.success-icon {
    display: inline-flex;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--primary);
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

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

.result-card h3 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-weight: 700;
}

.file-preview {
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-secondary);
    padding: 1rem;
}

.file-preview img, .file-preview video {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius);
    display: block;
    margin: 0 auto;
}

.result-info {
    margin-bottom: 2rem;
}

.info-card {
    margin-bottom: 1.5rem;
}

.info-card label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 0.938rem;
}

.info-card label svg {
    color: var(--primary);
}

.copy-group {
    display: flex;
    gap: 0.75rem;
}

.copy-group input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.938rem;
    font-family: 'Courier New', monospace;
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    white-space: nowrap;
}

.btn-copy:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.file-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin-top: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.detail-item svg {
    color: var(--primary);
    flex-shrink: 0;
}

.qr-section {
    text-align: center;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.qr-section h4 {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.qr-container {
    display: inline-block;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px var(--shadow);
}

.features {
    margin-top: 5rem;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-md);
    border-color: var(--primary);
}

.feature-icon {
    display: inline-flex;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    color: var(--text-primary);
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.938rem;
    line-height: 1.6;
}

.footer {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-tertiary);
    margin-top: 5rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }
    
    .upload-section {
        padding: 1.5rem 1rem;
    }
    
    .drop-zone {
        padding: 2rem 1rem;
    }
    
    .url-input-group {
        flex-wrap: wrap;
    }
    
    .url-input-group input {
        min-width: 0;
        width: 100%;
        flex: 1 1 100%;
    }
    
    .url-input-group button {
        flex-shrink: 0;
    }
    
    .result-card {
        padding: 2rem 1rem;
    }
    
    .copy-group {
        flex-direction: column;
    }
    
    .file-details {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .nav-content {
        padding: 0 1rem;
    }
    
    .logo {
        gap: 0.5rem;
    }
    
    .logo svg {
        width: 28px;
        height: 28px;
    }
    
    .logo span {
        font-size: 1rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 0.938rem;
    }
    
    .upload-section {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .drop-zone {
        padding: 1.5rem 0.75rem;
    }
    
    .upload-icon-wrapper {
        padding: 1rem;
    }
    
    .upload-icon {
        width: 40px;
        height: 40px;
    }
    
    .drop-zone h3 {
        font-size: 1.125rem;
    }
    
    .url-input-group {
        padding: 0.375rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .url-input-group svg:first-child {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
    }
    
    .url-input-group input {
        padding-left: 2.5rem;
    }
    
    .url-input-group button {
        width: 100%;
        justify-content: center;
    }
    
    .result-card {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }
    
    .success-icon {
        padding: 1rem;
    }
    
    .success-icon svg {
        width: 48px;
        height: 48px;
    }
    
    .result-card h3 {
        font-size: 1.5rem;
    }
    
    .info-card {
        margin-bottom: 1rem;
    }
    
    .copy-group input {
        font-size: 0.813rem;
        padding: 0.75rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .btn-copy {
        width: 100%;
        justify-content: center;
    }
    
    .file-details {
        padding: 1rem;
    }
    
    .detail-item {
        font-size: 0.813rem;
        word-break: break-word;
    }
    
    .qr-section {
        padding: 1.5rem 1rem;
    }
    
    .qr-container {
        padding: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}
