:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --accent-primary: #6c5ce7;
    --accent-secondary: #a8a5e6;
    --danger: #e74c3c;
    --success: #00b894;
    --warning: #fdcb6e;
    --border: #dfe6e9;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 15px 40px rgba(108, 92, 231, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-primary: #6c5ce7;
    --accent-secondary: #4a3f9e;
    --border: #2d3748;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
    overflow-x: hidden;
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.5s;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 50px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    animation: slideUp 0.5s;
    text-align: center;
}

.login-header {
    margin-bottom: 40px;
}

.login-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 3px solid var(--accent-primary);
}

.login-header h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

.login-header p {
    color: #666;
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-google, .btn-facebook {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn-google {
    background: #4285f4;
    color: white;
}

.btn-google:hover {
    background: #3367d6;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(66, 133, 244, 0.3);
}

.btn-facebook {
    background: #3b5998;
    color: white;
}

.btn-facebook:hover {
    background: #2d4373;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 89, 152, 0.3);
}

.login-terms {
    color: #666;
    font-size: 12px;
}

.login-terms a {
    color: var(--accent-primary);
    text-decoration: none;
}

/* Profile Preview */
.profile-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s;
}

.preview-card {
    background: var(--bg-primary);
    border-radius: 30px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: scaleIn 0.3s;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.preview-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.preview-close:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

.preview-content {
    text-align: center;
}

.preview-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 3px solid var(--accent-primary);
    animation: pulse 2s infinite;
}

.preview-content h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.preview-content p {
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.preview-provider {
    font-size: 14px;
    background: var(--bg-secondary);
    padding: 5px 15px;
    border-radius: 50px;
    display: inline-block;
    margin: 15px 0;
}

.btn-next {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px auto 0;
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
    gap: 15px;
}

/* Main App Layout */
.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    transition: var(--transition);
}

.sidebar-header {
    padding: 30px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    flex: 1;
    padding: 0 20px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    margin-bottom: 5px;
}

.menu-item i {
    width: 20px;
    font-size: 18px;
}

.menu-item:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
    transform: translateX(5px);
}

.menu-item.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.storage-info {
    text-align: center;
}

.storage-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    margin-bottom: 10px;
    overflow: hidden;
}

.storage-used {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 3px;
    transition: width 0.3s;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.search-bar {
    background: var(--bg-primary);
    border-radius: 50px;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 300px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.search-bar:focus-within {
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
    border-color: var(--accent-primary);
}

.search-bar i {
    color: var(--text-secondary);
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    color: var(--text-primary);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--accent-primary);
    transform: rotate(45deg);
}

/* User Menu */
.user-menu {
    position: relative;
    cursor: pointer;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    transition: var(--transition);
}

.user-avatar:hover {
    transform: scale(1.05);
    border-color: var(--accent-secondary);
}

.user-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background: var(--bg-primary);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    width: 300px;
    display: none;
    animation: slideDown 0.3s;
    z-index: 1000;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.dropdown-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--border);
}

.dropdown-header img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.dropdown-header h4 {
    color: var(--text-primary);
    margin-bottom: 5px;
}

.dropdown-header p {
    color: var(--text-secondary);
    font-size: 12px;
}

.dropdown-menu {
    padding: 10px;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
}

.dropdown-menu hr {
    margin: 10px 0;
    border: none;
    border-top: 1px solid var(--border);
}

/* Upload Card */
.upload-card {
    background: var(--bg-primary);
    border-radius: 30px;
    padding: 50px;
    text-align: center;
    border: 2px dashed var(--border);
    transition: var(--transition);
    margin-bottom: 40px;
}

.upload-card:hover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

.upload-icon i {
    font-size: 80px;
    color: var(--accent-primary);
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.upload-card h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.upload-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.btn-upload {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
    gap: 15px;
}

.upload-hint {
    margin-top: 20px;
    font-size: 14px;
}

.upload-hint i {
    color: var(--accent-primary);
    margin-right: 5px;
}

/* Loading */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading.active {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

/* Files Grid */
.files-section {
    margin-top: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h3 {
    color: var(--text-primary);
}

.section-header h3 i {
    color: var(--accent-primary);
    margin-right: 10px;
}

.btn-refresh {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-refresh:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.file-card {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    animation: fadeInUp 0.5s;
}

.file-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--hover-shadow);
}

.file-icon {
    font-size: 50px;
    color: var(--accent-primary);
    text-align: center;
    margin-bottom: 15px;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    word-break: break-word;
}

.file-meta {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}

.file-url {
    background: var(--bg-secondary);
    padding: 10px;
    border-radius: 10px;
    font-size: 12px;
    word-break: break-all;
    margin-bottom: 15px;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.file-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.btn-action {
    aspect-ratio: 1;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.btn-action:hover {
    transform: translateY(-3px);
}

.btn-copy {
    background: var(--success);
    color: white;
}

.btn-copy:hover {
    box-shadow: 0 5px 15px rgba(0, 184, 148, 0.3);
}

.btn-view {
    background: var(--accent-primary);
    color: white;
}

.btn-view:hover {
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

.btn-download {
    background: var(--warning);
    color: white;
}

.btn-download:hover {
    box-shadow: 0 5px 15px rgba(253, 203, 110, 0.3);
}

.btn-delete {
    background: var(--danger);
    color: white;
}

.btn-delete:hover {
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: var(--card-shadow);
    display: none;
    animation: slideInRight 0.3s;
    z-index: 9999;
    border-left: 4px solid var(--success);
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 40px;
}

.welcome-section h1 {
    font-size: 36px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-section p {
    color: var(--text-secondary);
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(108, 92, 231, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(108, 92, 231, 0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
    }
    
    .sidebar-title,
    .menu-item span,
    .storage-info span {
        display: none;
    }
    
    .main-content {
        margin-left: 80px;
    }
    
    .menu-item {
        justify-content: center;
        padding: 15px;
    }
    
    .menu-item i {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .top-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        padding: 30px;
    }
}