/* Leroi File Sharing Platform - Main Styles */

/* Base Styles */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b;
  --secondary-hover: #475569;
  --success-color: #10b981;
  --error-color: #ef4444;
  --background-color: #f8fafc;
  --card-background: #ffffff;
  --border-color: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 0.5rem;
  --transition: all 0.2s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: var(--transition);
  gap: 0.5rem;
}

.btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

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

.btn.primary:hover {
  background-color: var(--primary-hover);
}

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

.btn.secondary:hover {
  background-color: var(--secondary-hover);
}

.btn.small {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

/* Header */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

header h1 {
  margin-bottom: 0.5rem;
}

header p {
  margin-bottom: 0;
  opacity: 0.9;
}

/* Main Content */
main {
  flex: 1;
  padding-bottom: 3rem;
}

/* Upload Section */
.upload-section {
  margin-bottom: 3rem;
}

.upload-area {
  background-color: var(--card-background);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  transition: var(--transition);
}

.upload-area.highlight {
  border-color: var(--primary-color);
  background-color: rgba(37, 99, 235, 0.05);
}

.upload-icon {
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.upload-icon svg {
  width: 64px;
  height: 64px;
}

.upload-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.upload-info {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 1rem;
}

/* Upload Progress */
.upload-progress {
  background-color: var(--card-background);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 2rem;
  box-shadow: var(--shadow);
}

.upload-progress h3 {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.progress-item {
  background-color: var(--background-color);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.progress-item:last-child {
  margin-bottom: 0;
}

.progress-item.completed {
  background-color: rgba(16, 185, 129, 0.1);
  border-left: 4px solid var(--success-color);
}

.progress-item.error {
  background-color: rgba(239, 68, 68, 0.1);
  border-left: 4px solid var(--error-color);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.progress-filename {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.progress-size {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.progress-bar-container {
  height: 0.5rem;
  background-color: var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 1rem;
  transition: width 0.3s ease;
}

.progress-status {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.progress-item.completed .progress-status {
  color: var(--success-color);
}

.progress-item.error .progress-status {
  color: var(--error-color);
}

/* Files Section */
.files-section {
  background-color: var(--card-background);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.files-section h2 {
  margin-bottom: 1.5rem;
}

.files-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.files-empty {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-secondary);
}

.files-error {
  text-align: center;
  padding: 2rem 0;
  color: var(--error-color);
}

.file-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.file-item:last-child {
  border-bottom: none;
}

.file-item:hover {
  background-color: var(--background-color);
}

.file-icon {
  margin-right: 1rem;
  color: var(--secondary-color);
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.file-actions {
  margin-left: 1rem;
}

/* Footer */
footer {
  background-color: var(--card-background);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 0;
  margin-top: auto;
}

footer p {
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-align: center;
}

/* Error Messages */
.error-message {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  background-color: var(--error-color);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.error-message.show {
  transform: translateX(-50%) translateY(0);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .upload-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .file-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .file-icon {
    margin-bottom: 0.5rem;
    margin-right: 0;
  }
  
  .file-actions {
    margin-left: 0;
    margin-top: 1rem;
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .upload-area {
    padding: 2rem 1rem;
  }
  
  .upload-icon svg {
    width: 48px;
    height: 48px;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.25rem;
  }
}