
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --surface-800: #1e293b;
    --surface-900: #0f172a;
    --surface-950: #020617;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--surface-950);
    color: #e2e8f0;
    min-height: 100vh;
    overflow-x: hidden;
}

.sidebar {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(180deg, var(--surface-900) 0%, var(--surface-800) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1000 !important;
        height: 100vh;
        top: 0;
        left: 0;
    }
    .sidebar-open {
        transform: translateX(0);
    }
}

.file-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-500);
}

.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500) 0%, var(--primary-600) 100%);
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.context-menu {
    display: none;
    position: fixed;
    z-index: 1000;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay {
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropzone-active {
    border: 2px dashed var(--primary-500) !important;
    background: rgba(14, 165, 233, 0.1) !important;
    animation: pulse-slow 2s infinite;
}

.file-icon {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(2, 132, 199, 0.1) 100%);
}

.storage-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.3);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.3);
}

.top-bar {
    background: linear-gradient(to right, var(--surface-800), var(--surface-900));
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.main-content {
    background: linear-gradient(to bottom right, var(--surface-900), var(--surface-950));
}

@keyframes float {
    0%, 100% { transform: 'translateY(0)'; }
    50% { transform: 'translateY(-10px)'; }
}

@keyframes fadeIn {
    0% { opacity: '0'; transform: 'translateY(10px)'; }
    100% { opacity: '1'; transform: 'translateY(0)'; }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.notification {
    animation: fadeIn 0.3s ease-out, fadeIn 0.3s ease-out 2.7s reverse forwards;
}

.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .file-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
        padding: 0.5rem;
    }
    
    .file-card {
        padding: 0.75rem;
    }
    
    .search-input {
        width: 150px;
    }
    
    .search-input:focus {
        width: 180px;
    }
    
    .modal-content {
        width: 95%;
        margin: 0 auto;
    }
    
    .context-menu {
        min-width: 180px;
        right: 10px !important;
        left: auto !important;
    }
}

@media (max-width: 400px) {
    .file-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    
    .top-bar-actions {
        flex-direction: column-reverse;
        align-items: flex-end;
        gap: 0.5rem;
    }
    
    .user-menu-btn {
        margin-left: 0;
    }
}

/* Context menu item */
.context-menu-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.context-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Input styles */
input, select {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

/* Close button for modals */
.close-btn {
    transition: all 0.2s;
}

.close-btn:hover {
    transform: rotate(90deg);
    color: var(--primary-400);
}

/* Auth modal */
.auth-tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.auth-tab.active {
    color: white;
    border-bottom-color: var(--primary-500);
}

.auth-form {
    transition: all 0.3s ease;
}

/* Auth state */
.auth-required {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}

.auth-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 100;
    max-width: 90%;
}

/* Preview container */
.preview-container {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    transition: all 0.3s ease;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-container:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.2);
}

.preview-container .placeholder {
    transition: all 0.3s ease;
}

.preview-container .placeholder.hidden {
    opacity: 0;
    visibility: hidden;
}

.preview-content {
    transition: opacity 0.3s ease;
    max-width: 100%;
    max-height: 100%;
}

.preview-content.hidden {
    opacity: 0;
    position: absolute;
}

.preview-content:not(.hidden) {
    opacity: 1;
}

.preview-container img {
    object-fit: contain;
    background: #1e293b;
    max-height: 100%;
}

.preview-container video {
    object-fit: cover;
    background: #000;
    max-height: 100%;
}

.preview-container audio {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: #1e293b;
    border-radius: 0 0 0.5rem 0.5rem;
}

.preview-container .fa-play {
    transition: all 0.3s ease;
    z-index: 2;
}

.preview-container:hover .fa-play {
    opacity: 1;
    transform: scale(1.2);
}

/* Upload progress */
.upload-progress-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--surface-800);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    width: 300px;
}

.upload-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.upload-progress-bar {
    height: 8px;
    background: #2d3748;
    border-radius: 4px;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
    width: 0%;
    transition: width 0.3s ease;
}

.upload-progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #a0aec0;
}

/* Admin dashboard */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background-color: var(--surface-800);
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--surface-700);
    color: #cbd5e1;
}

.admin-table tr:hover {
    background-color: rgba(30, 41, 59, 0.5);
}

.plan-card {
    transition: all 0.3s ease;
    border: 1px solid var(--surface-700);
    border-radius: 10px;
    overflow: hidden;
}

.plan-card:hover, .plan-card.selected {
    border-color: var(--primary-500);
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.1);
}

.plan-card.selected {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(2, 132, 199, 0.1));
}

.plan-card .highlight {
    position: relative;
    overflow: hidden;
}

.plan-card .highlight:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
}

.savings-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(90deg, #10b981, #059669);
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
