/* ===== Reset & Base Styles ===== */
* {
  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: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

/* ===== Navigation Bar ===== */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s;
}

.nav-logo:hover {
  color: #764ba2;
}

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

.nav-link {
  text-decoration: none;
  color: #555;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.3s;
}

.nav-link:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.nav-link-icon {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.nav-link-text {
  display: inline;
}

@media (min-width: 769px) {
  .nav-link-text {
    display: none;
  }
  
  .nav-link-icon {
    padding: 8px 12px;
  }
}

.nav-user .nav-link {
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
  cursor: default;
}

.nav-button {
  background: #f5f5f5;
  color: #555;
}

.nav-button:hover {
  background: #e0e0e0;
  color: #333;
}

.nav-button-primary {
  background: #667eea;
  color: white !important;
}

.nav-button-primary:hover {
  background: #5568d3;
}

/* ===== Dropdown Menu ===== */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: inherit;
  font-family: inherit;
}

.nav-dropdown-arrow {
  transition: transform 0.3s;
}

.nav-dropdown-toggle[aria-expanded="true"] .nav-dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  list-style: none;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s;
  z-index: 1001;
}

.nav-dropdown-menu-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: block;
  padding: 10px 16px;
  color: #555;
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 500;
}

.nav-dropdown-item:hover {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

/* ===== Hamburger Menu (Hidden on Desktop) ===== */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background: #667eea;
  border-radius: 2px;
  transition: all 0.3s ease;
}

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

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

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

/* ===== Main Content ===== */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: calc(100vh - 140px);
}

/* ===== Hero Section ===== */
.hero {
  text-align: center;
  padding: 60px 20px;
  color: white;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
  font-size: 1.3rem;
  opacity: 0.95;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* ===== Projects Section ===== */
.projects-section {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.section-title {
  font-size: 2rem;
  color: #333;
  margin-bottom: 30px;
  text-align: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.project-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-decoration: none;
  color: inherit;
  cursor: default;
}

.project-card-clickable {
  cursor: pointer;
}

.project-card-clickable:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.project-card-login-required {
  cursor: pointer;
  border-color: #ffd43b;
}

.project-card-login-required:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 193, 7, 0.2);
  border-color: #ffc107;
}

.project-card-disabled {
  opacity: 0.6;
  background: #f9f9f9;
  cursor: not-allowed;
}

.project-title {
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
  margin-bottom: 12px;
}

.project-description {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
  flex-grow: 1;
}

.project-status {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: auto;
}

.project-status-coming-soon {
  background: #f0f0f0;
  color: #999;
}

.project-status-login {
  background: #fff3cd;
  color: #856404;
}

.project-category-badge {
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 5px;
}

/* ===== Category Page Header ===== */
.category-header {
  text-align: center;
  margin-bottom: 40px;
}

.back-link {
  display: inline-block;
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 20px;
  transition: color 0.3s;
}

.back-link:hover {
  color: #764ba2;
}

.category-description {
  color: #666;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Login Prompt ===== */
.login-prompt {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.login-box {
  background: white;
  border-radius: 20px;
  padding: 60px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  max-width: 500px;
}

.login-box h2 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 1rem;
}

.login-box p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

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

.btn {
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn-secondary:hover {
  background: #667eea;
  color: white;
}

/* ===== Footer ===== */
.footer {
  background: rgba(255, 255, 255, 0.95);
  text-align: center;
  padding: 20px;
  color: #666;
  font-size: 0.9rem;
}

/* ===== Flash Messages ===== */
.flash-message {
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 10px;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ===== Admin Pages Styles ===== */
.admin-page-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
  padding: 40px 20px;
}

.admin-card {
  background: white;
  border-radius: 20px;
  padding: 50px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 100%;
}

.admin-header {
  text-align: center;
  margin-bottom: 35px;
}

.admin-title {
  font-size: 2rem;
  color: #333;
  margin-bottom: 10px;
}

.admin-subtitle {
  color: #666;
  font-size: 1rem;
}

.admin-form {
  width: 100%;
}

.admin-form-group {
  margin-bottom: 25px;
}

.admin-label {
  display: block;
  color: #555;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.admin-input,
.admin-select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s;
  background: white;
}

.admin-input:focus,
.admin-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.admin-select {
  cursor: pointer;
}

.admin-submit-btn {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.admin-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.admin-footer {
  margin-top: 30px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.admin-footer-text {
  color: #666;
  margin: 10px 0;
  font-size: 0.95rem;
}

.admin-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.admin-link:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* ===== Admin Logs Page ===== */
.admin-logs-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.admin-logs-header {
  text-align: center;
  margin-bottom: 30px;
}

.admin-logs-title {
  font-size: 2.5rem;
  color: white;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.admin-logs-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
}

.logs-filters {
  background: white;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 150px;
}

.filter-group-search {
  flex: 1;
  min-width: 200px;
}

.filter-label {
  color: #555;
  font-weight: 600;
  font-size: 0.9rem;
}

.filter-select,
.filter-input {
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s;
  background: white;
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-select {
  cursor: pointer;
}

.filter-reset-btn {
  padding: 10px 20px;
  background: #f0f0f0;
  color: #555;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  height: fit-content;
}

.filter-reset-btn:hover {
  background: #e0e0e0;
}

.admin-logs-table-wrapper {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-logs {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.table-logs thead tr {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.table-logs th {
  color: white;
  font-weight: 600;
  padding: 15px 12px;
  text-align: left;
  white-space: nowrap;
}

.table-logs th:first-child {
  border-top-left-radius: 10px;
}

.table-logs th:last-child {
  border-top-right-radius: 10px;
}

.table-logs td {
  padding: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.table-logs tbody tr:hover {
  background-color: #f5f5f5;
}

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

.log-timestamp {
  white-space: nowrap;
  color: #666;
  font-size: 0.9rem;
}

.log-user {
  color: #667eea;
  font-weight: 500;
}

.log-project {
  color: #764ba2;
  font-weight: 600;
  text-transform: capitalize;
}

.log-category {
  color: #555;
  font-weight: 600;
}

.log-description {
  color: #666;
}

.admin-logs-footer {
  margin-top: 30px;
  text-align: center;
}

/* ===== Auth Pages Styles ===== */
.auth-page-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
  padding: 40px 20px;
}

.auth-card {
  background: white;
  border-radius: 20px;
  padding: 50px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 100%;
}

.auth-header {
  text-align: center;
  margin-bottom: 35px;
}

.auth-title {
  font-size: 2rem;
  color: #333;
  margin-bottom: 10px;
}

.auth-subtitle {
  color: #666;
  font-size: 1rem;
}

.auth-form {
  width: 100%;
}

.auth-form-group {
  margin-bottom: 25px;
}

.auth-label {
  display: block;
  color: #555;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.auth-input,
.auth-select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s;
  background: white;
}

textarea.auth-input {
  min-height: 120px;
  resize: vertical;
}

.auth-input:focus,
.auth-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-input::placeholder {
  color: #999;
}

.auth-select {
  cursor: pointer;
}

.auth-error-messages {
  margin-top: 8px;
}

.auth-error {
  display: block;
  color: #e74c3c;
  font-size: 0.875rem;
  margin-top: 4px;
}

.auth-submit-btn {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 25px 0;
  color: #999;
  font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e0e0e0;
}

.auth-divider::before {
  margin-right: 10px;
}

.auth-divider::after {
  margin-left: 10px;
}

.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
  background: white;
  color: #333;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  font-family: inherit;
  cursor: pointer;
}

.auth-google-btn:hover {
  border-color: #4285F4;
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.2);
  transform: translateY(-1px);
}

.auth-google-btn:active {
  transform: translateY(0);
}

.auth-footer {
  margin-top: 30px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.auth-footer-text {
  color: #666;
  margin: 10px 0;
  font-size: 0.95rem;
}

.auth-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.auth-link:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* ===== 404 Error Page ===== */
.error-page-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
  padding: 40px 20px;
}

.error-card {
  background: white;
  border-radius: 20px;
  padding: 60px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 100%;
}

.error-icon {
  font-size: 6rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.error-title {
  font-size: 2rem;
  color: #333;
  margin-bottom: 15px;
}

.error-message {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 30px;
  line-height: 1.6;
}

.error-btn {
  display: inline-block;
  padding: 14px 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s;
}

.error-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  /* Mobile Navigation */
  .nav-hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 70px);
    background: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    gap: 0;
  }

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

  .nav-item {
    width: 100%;
    margin: 0;
  }
  
  /* Mobile dropdown styles */
  .nav-dropdown-menu {
    position: static;
    margin-top: 0;
    box-shadow: none;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    transform: none;
    padding: 4px 0;
    max-height: 0;
    overflow: hidden;
  }
  
  .nav-dropdown-menu-active {
    max-height: 200px;
    padding: 8px 0;
  }
  
  .nav-dropdown-item {
    padding: 10px 24px;
  }
  
  .nav-dropdown-toggle {
    width: 100%;
    justify-content: flex-start;
    padding: 8px 16px;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 15px 20px;
    margin: 5px 0;
    border-radius: 8px;
    text-align: left;
  }
  
  .nav-link-text {
    display: inline !important;
  }
  
  .nav-link-icon {
    justify-content: flex-start;
  }

  .nav-user .nav-link {
    font-size: 0.9rem;
    word-break: break-word;
  }

  .nav-button,
  .nav-button-primary {
    text-align: center;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .projects-section {
    padding: 20px;
  }

  .project-card {
    padding: 20px;
    text-align: left;
  }

  .project-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
  }

  .project-description {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 12px;
  }

  .project-status {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .login-box {
    padding: 40px 30px;
  }

  .login-actions {
    flex-direction: column;
  }

  .auth-card {
    padding: 30px 25px;
  }

  .auth-title {
    font-size: 1.75rem;
  }

  .admin-card {
    padding: 30px 25px;
  }

  .admin-title {
    font-size: 1.75rem;
  }

  .admin-logs-title {
    font-size: 2rem;
  }

  .logs-filters {
    padding: 15px;
  }

  .filter-group {
    width: 100%;
  }

  .filter-group-search {
    min-width: 100%;
  }

  .filter-reset-btn {
    width: 100%;
  }

  .admin-logs-table-wrapper {
    padding: 10px;
    border-radius: 10px;
  }

  .table-logs {
    font-size: 0.85rem;
    min-width: 600px;
  }

  .table-logs th,
  .table-logs td {
    padding: 10px 6px;
  }

  .log-timestamp {
    font-size: 0.75rem;
    white-space: normal;
    line-height: 1.3;
    min-width: 85px;
    max-width: 90px;
  }

  .log-user {
    font-size: 0.8rem;
    word-break: break-word;
  }

  .log-category {
    font-size: 0.8rem;
  }

  .log-description {
    font-size: 0.8rem;
  }

  .error-card {
    padding: 40px 30px;
  }

  .error-icon {
    font-size: 4rem;
  }

  .error-title {
    font-size: 1.75rem;
  }

  .error-message {
    font-size: 1rem;
  }
}
