/* Modern White and Orange Theme - Responsive Design */
:root {
  --primary-color: #ff6b35;
  --primary-dark: #e85a2a;
  --primary-light: #ff8c61;
  --secondary-color: #ffffff;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --success: #27ae60;
  --danger: #e74c3c;
  --warning: #f39c12;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Icon Sizes */
.icon-xs {
  width: 14px;
  height: 14px;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-md {
  width: 20px;
  height: 20px;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

.icon-xl {
  width: 32px;
  height: 32px;
}

/* Navigation */
.navbar {
  background-color: var(--bg-white);
  box-shadow: var(--shadow);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--primary-color);
}

.nav-container {
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  z-index: 1001;
}

.nav-logo:hover {
  transform: translateY(-2px);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-dark);
  z-index: 1001;
}

.nav-menu {
  display: flex;
  gap: 1rem;
  list-style: none;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: var(--transition);
}

.nav-link:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

.nav-link.active {
  background-color: var(--primary-light);
  color: white;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--bg-light);
  border-radius: var(--radius);
  font-weight: 500;
  list-style: none;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  white-space: nowrap;
}

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

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

.btn-secondary {
  background-color: var(--bg-light);
  color: var(--text-dark);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: #e9ecef;
  border-color: var(--text-light);
}

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

.btn-danger:hover {
  background-color: #c0392b;
}

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

.btn-success:hover {
  background-color: #229954;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Container */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Cards */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body {
  padding: 1rem 0;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(30%, -30%);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  opacity: 0.95;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-select {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  background-color: white;
  cursor: pointer;
  font-family: inherit;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.table th,
.table td {
  padding: 1rem;
  text-align: left;
}

.table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

.table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.table tbody tr:hover {
  background-color: var(--bg-light);
}

.table tbody tr:last-child {
  border-bottom: none;
}

/* Upload Zone */
.upload-zone {
  border: 3px dashed var(--primary-color);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  background-color: var(--bg-light);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.upload-zone:hover,
.upload-zone.active {
  background-color: rgba(255, 107, 53, 0.05);
  border-color: var(--primary-dark);
  transform: scale(1.01);
}

.upload-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

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

/* Progress Bar */
.progress {
  width: 100%;
  height: 32px;
  background-color: var(--bg-light);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
  border-radius: 16px;
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
}

/* File List */
.file-list {
  list-style: none;
}

.file-item {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.file-item:hover {
  background: white;
  box-shadow: var(--shadow);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.file-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
}

.file-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

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

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

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

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

/* Alert */
.alert {
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  display: flex;
  align-items: center;
  padding: 0.25rem;
  border-radius: var(--radius);
  transition: var(--transition);
}

.modal-close:hover {
  background-color: var(--bg-light);
  color: var(--text-dark);
}

/* Loading Spinner */
.spinner {
  border: 4px solid var(--bg-light);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-menu.active {
    max-height: 500px;
    padding: 1rem;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-link,
  .nav-user {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .table {
    font-size: 0.875rem;
  }

  .table th,
  .table td {
    padding: 0.75rem 0.5rem;
  }

  .file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .file-actions {
    width: 100%;
  }

  .stat-card {
    padding: 1.5rem;
  }

  .stat-value {
    font-size: 2rem;
  }

  .share-link-container {
    flex-wrap: nowrap;
  }

  .button-group {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .button-group .btn {
    flex: 1 1 auto;
    min-width: 140px;
  }

  /* Share Page Tablet */
  .share-stats {
    padding: 1.25rem;
  }

  .share-stat-item {
    flex: 1 1 calc(33.333% - 1rem);
    min-width: 90px;
  }

  .btn-lg {
    padding: 0.875rem 1.75rem;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }

  .card-title {
    font-size: 1.25rem;
  }

  .upload-zone {
    padding: 2rem 1rem;
  }

  .upload-zone h3 {
    font-size: 1rem;
  }

  .upload-zone p {
    font-size: 0.875rem;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .share-link-container {
    flex-direction: column;
    gap: 0.5rem;
  }

  .share-link-container .form-control,
  .share-link-container .btn {
    width: 100%;
  }

  .button-group {
    flex-direction: column;
    gap: 0.5rem;
  }

  .button-group .btn {
    width: 100%;
    min-width: unset;
  }

  .file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .file-info {
    width: 100%;
  }

  .file-actions {
    width: 100%;
    justify-content: flex-end;
  }

  /* Share Page Mobile */
  .share-app-title {
    font-size: 1.25rem;
    gap: 0.5rem;
  }

  .share-stats {
    padding: 1rem;
    gap: 0.75rem;
  }

  .share-stat-item {
    min-width: 70px;
  }

  .share-stat-value {
    font-size: 1.5rem;
  }

  .share-stat-icon {
    width: 24px;
    height: 24px;
  }

  .btn-lg {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
    width: 100%;
  }

  .share-files-title {
    font-size: 1rem;
  }

  .file-actions .btn {
    width: 100%;
  }
}

/* Extra Small Devices (320px and below) */
@media (max-width: 360px) {
  .container {
    padding: 1rem 0.75rem;
  }

  .card {
    padding: 1rem;
  }

  .card-header {
    padding: 1rem;
  }

  .card-body {
    padding: 1rem;
  }

  .share-app-title {
    font-size: 1.1rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .share-app-title .icon-lg {
    width: 32px;
    height: 32px;
  }

  .share-stats {
    padding: 0.75rem;
    gap: 0.5rem;
    flex-direction: column;
  }

  .share-stat-item {
    min-width: 100%;
    padding: 0.75rem;
    background: white;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
  }

  .share-stat-icon {
    width: 24px;
    height: 24px;
    margin: 0;
    flex-shrink: 0;
  }

  .share-stat-value {
    font-size: 1.5rem;
    flex-shrink: 0;
  }

  .share-stat-label {
    font-size: 0.875rem;
    flex-shrink: 0;
    margin-left: auto;
  }

  .btn-lg {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
  }

  .btn {
    font-size: 0.875rem;
    padding: 0.625rem 0.875rem;
  }

  .btn-sm {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
  }

  .share-description {
    padding: 1rem;
  }

  .file-item {
    padding: 0.875rem;
  }

  .file-info .icon-lg {
    width: 20px;
    height: 20px;
  }

  .file-name {
    font-size: 0.9rem;
  }

  .file-meta {
    font-size: 0.8rem;
  }

  .meta-separator {
    display: none;
  }

  .file-meta span {
    display: block;
    width: 100%;
  }

  .share-footer {
    padding: 0.875rem;
    font-size: 0.875rem;
    flex-direction: column;
    gap: 0.25rem;
  }

  h1, h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .nav-logo span {
    font-size: 1.1rem;
  }

  .table {
    font-size: 0.75rem;
  }

  .table th,
  .table td {
    padding: 0.5rem 0.25rem;
  }
}

/* Share Link Container */
.share-link-container {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  align-items: center;
}

.share-link-container .form-control {
  flex: 1;
  min-width: 0;
}

.share-link-container .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Button Group */
.button-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.button-group .btn {
  flex: 0 1 auto;
  min-width: 150px;
}

/* Share Page Styles */
.share-page-card {
  margin: 2rem 0;
}

.share-app-title {
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.share-version {
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.share-description {
  background: var(--bg-light);
  padding: 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.share-description-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.share-description-text {
  margin: 0;
  color: var(--text-dark);
  line-height: 1.6;
}

.share-stats {
  display: flex;
  justify-content: space-around;
  padding: 1.5rem;
  background: var(--bg-light);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.share-stat-item {
  text-align: center;
  flex: 1;
  min-width: 80px;
}

.share-stat-icon {
  width: 32px;
  height: 32px;
  color: var(--primary-color);
  margin: 0 auto 0.5rem;
}

.share-stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
  line-height: 1.2;
}

.share-stat-label {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.share-download-all {
  margin-bottom: 1.5rem;
  text-align: center;
}

.btn-lg {
  font-size: 1.1rem;
  padding: 1rem 2rem;
}

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

.share-files-title,
h3 {
  margin-bottom: 1rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.file-name {
  word-break: break-word;
  margin-bottom: 0.25rem;
}

.file-meta {
  font-size: 0.875rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.meta-separator {
  display: inline-block;
}

.share-footer {
  margin-top: 2rem;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
}

.toast {
  background: white;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  border-left: 4px solid;
  animation: slideIn 0.3s ease-out;
  transition: var(--transition);
}

.toast.hiding {
  animation: slideOut 0.3s ease-out forwards;
}

.toast-success {
  border-left-color: var(--success);
  background: #d4edda;
}

.toast-error {
  border-left-color: var(--danger);
  background: #f8d7da;
}

.toast-info {
  border-left-color: var(--primary-color);
  background: #d1ecf1;
}

.toast-icon {
  flex-shrink: 0;
}

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

.toast-error .toast-icon {
  color: var(--danger);
}

.toast-info .toast-icon {
  color: var(--primary-color);
}

.toast-message {
  flex: 1;
  color: var(--text-dark);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  transition: var(--transition);
}

.toast-close:hover {
  color: var(--text-dark);
}

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

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

@media (max-width: 480px) {
  .toast-container {
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .toast {
    min-width: auto;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

.align-center {
  align-items: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-full {
  width: 100%;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}
