/* Import minimal font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 300;
    line-height: 1.5;
    color: #111827;
    background-color: #f9fafb;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Utility classes */
.hidden {
    display: none;
}

/* Transitions */
.transition-colors {
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.transition-all {
    transition: all 0.15s ease-in-out;
}

/* Focus styles */
input:focus,
button:focus {
    outline: none;
}

/* Button styles */
button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Input styles */
input {
    font-family: inherit;
    font-size: inherit;
}

input::placeholder {
    color: #9ca3af;
}

/* Link styles */
a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
}

/* Authentication page styles */
#auth-page {
    background: linear-gradient(to bottom, #ffffff, #f9fafb);
}

#auth-page .bg-white {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(229, 231, 235, 0.5);
}

/* Upload page header - Fixed and blurred */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
}

/* Mobile menu styles with animation */
#mobile-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu:not(.hidden) {
    transform: translateY(0);
    opacity: 1;
}

#mobile-menu.hidden {
    display: none;
    transform: translateY(-10px);
    opacity: 0;
}

/* Navigation hover effects */
nav a,
nav button {
    position: relative;
    border-radius: 0.375rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a:hover,
nav button:hover {
    background-color: rgba(243, 244, 246, 0.8);
}

nav a.active {
    background-color: #111827;
    color: #ffffff;
}

/* Red logout button styles */
#logout-btn,
#mobile-logout-btn {
    color: #dc2626;
    font-weight: 400;
}

#logout-btn:hover,
#mobile-logout-btn:hover {
    background-color: rgba(254, 226, 226, 0.8);
}

/* Upload area styles */
#upload-area {
    background: rgba(249, 250, 251, 0.8);
    border: 2px dashed #d1d5db;
    transition: all 0.2s ease-in-out;
}

#upload-area:hover {
    border-color: #9ca3af;
    background: rgba(243, 244, 246, 0.9);
}

#upload-area.drag-over {
    border-color: #374151;
    background: rgba(243, 244, 246, 1);
    transform: scale(1.01);
}

/* Progress bar styles */
.upload-progress {
    transition: width 0.3s ease-out;
    background: linear-gradient(90deg, #111827 0%, #374151 100%);
}

/* File size and progress text styles */
.file-size {
    color: #6b7280;
    font-size: 0.75rem;
    line-height: 1.2;
}

.progress-text {
    color: #6b7280;
    font-size: 0.75rem;
    min-width: 2.5rem;
    text-align: center;
}

/* Progress bar container */
.file-item .flex.flex-col.items-end {
    min-width: 8rem;
}

/* Copy link button hover effect */
button[onclick*="copyFileLink"]:hover {
    color: #3b82f6 !important;
    transform: scale(1.1);
}

/* Delete button hover effect */
button[onclick*="deleteFile"]:hover {
    color: #ef4444 !important;
    transform: scale(1.1);
}

/* File list styles */
#files-section .bg-white,
.archive-section .bg-white {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(229, 231, 235, 0.5);
}

/* File item button styles */
.file-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: rgba(249, 250, 251, 1);
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    text-align: left;
    transition: all 0.15s ease-in-out;
}

.file-item:hover {
    background-color: rgba(243, 244, 246, 1);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-item.cursor-pointer:hover {
    background-color: rgba(243, 244, 246, 1);
    border-color: #d1d5db;
}

/* Modal styles */
#file-modal {
    backdrop-filter: blur(4px);
}

#file-modal .bg-white {
    animation: modalSlideIn 0.3s ease-out;
    border-radius: 1rem;
}

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

#file-modal .modal-header {
    background: rgba(243,244,246,0.1); /* light gray, semi-transparent */
    backdrop-filter: blur(12px);
    border-radius: 1rem;
    box-shadow: 0 2px 8px -2px rgba(0,0,0,0.04);
    z-index: 10;
}
#file-modal .modal-content {
    overflow-y: auto;
    flex: 1 1 auto;
    max-height: calc(90vh - 128px); /* header + footer height */
}

/* Tag styles */
#tags-container .inline-flex {
  background-color: #e5e7eb;
  color: #374151;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.95em;
  font-weight: 400;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s;
}
#tags-container .inline-flex button {
  font-size: 1.2em;
  color: #ef4444; /* Tailwind red-500 */
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}
#tags-container .inline-flex button:hover {
  color: #b91c1c; /* Tailwind red-700 */
}

/* File preview styles */
#preview-container {
    min-height: 8rem;
    border: 1px solid #e5e7eb;
}

#preview-container img {
    object-fit: contain;
}

/* Modal input styles */
#file-modal input[readonly] {
    background-color: #f9fafb;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

#file-modal input[readonly]:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

#file-modal input[readonly]:focus {
    background-color: #f9fafb;
    outline: none;
    border-color: #374151;
    box-shadow: 0 0 0 1px #374151;
}

/* Error message styles */
#name-error {
    animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Copy button hover effects */
#copy-file-link:hover,
#copy-markdown-link:hover {
    background-color: #1f2937 !important;
}

/* Tag input focus */
#new-tag:focus {
    border-color: #374151;
    box-shadow: 0 0 0 1px #374151;
}

/* File item button spacing */
.file-item .flex.items-center.space-x-2 button {
    margin-left: 0.25rem;
}

/* Grid layout for archive pages */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

@media (max-width: 640px) {
    .file-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Mobile file item layout */
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
        width: 100%;
    }
    
    .file-item .flex.items-start.justify-between {
        width: 100%;
    }
    
    .file-item .flex.items-center.space-x-3 {
        flex: 1;
        min-width: 0;
    }
    
    .file-item .flex.items-center.space-x-1 {
        flex-shrink: 0;
    }
    
    .file-item .w-full {
        width: 100%;
    }
    
    /* Mobile progress bar - full width */
    .file-item .w-full.h-2 {
        height: 0.5rem;
        width: 100%;
        margin: 0;
    }
    
    /* Mobile progress bar container */
    .file-item .mt-3 {
        width: 100%;
        margin-top: 0.75rem;
    }
    
    /* Mobile button spacing */
    .file-item button {
        padding: 0.25rem;
    }
    
    .file-item button:hover {
        transform: scale(1.1);
    }
}

/* Card styles for archive items */
.file-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(229, 231, 235, 0.5);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.15s ease-in-out;
}

.file-card:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(209, 213, 219, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.file-card.cursor-pointer:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(209, 213, 219, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Notification styles */
.notification {
    animation: slideIn 0.2s ease-out;
    background: #111827;
    color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

/* Main content padding for fixed header */
main {
    padding-top: 7rem;
}

/* Search input styles */
.search-input {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(229, 231, 235, 0.5);
}

/* Empty state styles */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

/* Responsive design */
@media (max-width: 768px) {
    #auth-page .p-8 {
        padding: 1.5rem;
    }

    #upload-area {
        padding: 2rem 1rem;
    }

    .max-w-4xl {
        max-width: 100%;
    }

    header .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    main .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    main {
        padding-top: 6rem;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    #auth-page .max-w-sm {
        max-width: 100%;
        margin: 0 1rem;
    }

    #upload-area {
        padding: 1.5rem 0.75rem;
    }

    .space-y-6 > * + * {
        margin-top: 1rem;
    }

    main {
        padding-top: 5.5rem;
    }
} 

/* File information styles */
#file-modal .bg-gray-50 {
    border: 1px solid #e5e7eb;
}

#file-modal .grid.grid-cols-2 {
    font-size: 0.875rem;
}

#file-modal .text-gray-500 {
    font-weight: 500;
}

#file-modal .text-gray-900.font-medium {
    font-weight: 600;
}

/* Modal content spacing */
#file-modal .space-y-6 > * + * {
    margin-top: 1.5rem;
} 

.cancel-upload-btn {
  color: #ef4444; /* Tailwind red-500 */
  transition: color 0.2s;
  margin-left: 0.5rem;
  display: flex;
  align-items: center;
}
.cancel-upload-btn:hover {
  color: #b91c1c; /* Tailwind red-700 */
} 