/* File: /home/claude/cloudflare-webapp/src/css/style.css */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
/* ===========================
   Modern Navbar
   =========================== */
.navbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0;
  margin-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  position: relative;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.navbar-logo:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.logo-icon {
  font-size: 2rem;
  line-height: 1;
}

.logo-text {
  font-weight: 700;
  letter-spacing: -0.5px;
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.navbar-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.navbar-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.navbar-menu {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: translateY(-2px);
}

.nav-link:hover::before {
  width: 80%;
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.nav-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.nav-text {
  white-space: nowrap;
}

.nav-link-cta {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 0.6rem 1.5rem;
}

.nav-link-cta:hover {
  background: white;
  color: #667eea;
  border-color: white;
}

#logoutBtn {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 0.5rem;
}

#logoutBtn:hover {
  background: rgba(244, 67, 54, 0.9);
  border-color: rgba(244, 67, 54, 1);
  transform: translateY(-2px);
}

/* Responsive Navbar */
@media (max-width: 768px) {
  .navbar-toggle {
    display: flex;
  }

  .navbar-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 20px 20px;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    overflow-y: auto;
  }

  .navbar-menu.active {
    right: 0;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 1rem 1.2rem;
  }

  .nav-link::before {
    display: none;
  }

  .nav-link:hover {
    transform: translateX(5px);
  }

  #logoutBtn {
    width: 100%;
    margin-left: 0;
    margin-top: 0.5rem;
  }
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0;
  background-color: #fff;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 3rem;
  color: #333;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  color: #666;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.feature {
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
}

.feature h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background-color: #f38020;
  color: #fff;
}

.btn-primary:hover {
  background-color: #d97019;
}

.btn-secondary {
  background-color: #fff;
  color: #f38020;
  border: 2px solid #f38020;
}

.btn-secondary:hover {
  background-color: #f38020;
  color: #fff;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Auth Pages */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.auth-box {
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 400px;
}

.auth-box h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #333;
}

.auth-form {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-group input:focus {
  outline: none;
  border-color: #f38020;
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  color: #666;
  font-size: 0.875rem;
}

.error-message {
  color: #d32f2f;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 4px;
  background-color: #ffebee;
  display: none;
}

.error-message.show {
  display: block;
}

.auth-link {
  text-align: center;
  margin-top: 1rem;
  color: #666;
}

.auth-link a {
  color: #f38020;
  text-decoration: none;
}

.auth-link a:hover {
  text-decoration: underline;
}

/* Dashboard */
.dashboard {
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f5f5f5;
}

.dashboard-content {
  display: grid;
  gap: 1.5rem;
}

.dashboard-card {
  background-color: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.dashboard-card h3 {
  margin-bottom: 1rem;
  color: #333;
}

#filesList {
  margin-top: 1rem;
}

.file-item {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background-color: #fff;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-item a {
  color: #f38020;
  text-decoration: none;
}

.file-item a:hover {
  text-decoration: underline;
}

#uploadStatus {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 4px;
}

#uploadStatus.success {
  background-color: #e8f5e9;
  color: #2e7d32;
}

#uploadStatus.error {
  background-color: #ffebee;
  color: #d32f2f;
}

/* Footer */
.footer {
  background-color: #fff;
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

.footer p {
  color: #666;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .dashboard-header {
    flex-direction: column;
    gap: 1rem;
  }
}
