/* style.css - Added styles for request form and modal */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  color: #333;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* Modal Styles */
.modal {
  display: block;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
  animation: fadeIn 0.3s;
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: slideInModal 0.3s ease-out;
}

.modal-header {
  padding: 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 15px 15px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.8em;
}

.close-btn {
  color: white;
  font-size: 28px;
  font-weight: bold;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.close-btn:hover {
  background: rgba(255,255,255,0.2);
}

.modal-body {
  padding: 20px;
  color: #333;
  line-height: 1.6;
}

.modal-body h3 {
  color: #667eea;
  margin-top: 20px;
}

.modal-body ul {
  margin: 10px 0;
  padding-left: 20px;
}

.modal-footer {
  padding: 20px;
  background: #f8f9fa;
  border-top: 1px solid #ddd;
  border-radius: 0 0 15px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.modal-footer label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

#agree-btn {
  padding: 12px 30px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s;
  font-family: 'Poppins', sans-serif;
}

#agree-btn:hover:not(:disabled) {
  transform: scale(1.02);
}

#agree-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInModal {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Top navigation bar - More playful with glow */
.top-nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #333;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.logo {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  color: #667eea;
}

.logo .icon {
  margin-right: 8px;
  font-size: 24px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
  60% { transform: translateY(-3px); }
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

.nav-links a:hover {
  color: #764ba2;
  transform: scale(1.05);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #667eea;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Features Dashboard */
.features-dashboard {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 10px 20px;
  margin-bottom: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  overflow: hidden;
}

.dashboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.dashboard-link {
  text-decoration: none;
  color: #667eea;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 25px;
  transition: all 0.3s ease;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.dashboard-link:hover {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

@media (max-width: 768px) {
  .dashboard-list {
    gap: 15px;
  }

  .dashboard-link {
    padding: 6px 12px;
    font-size: 14px;
  }
}

/* Hero section - Engaging header to draw in students */
.hero {
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px 20px;
  margin-bottom: 40px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.hero-title {
  font-size: 2.8em;
  font-weight: 700;
  color: white;
  margin: 0 0 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  animation: fadeInUp 1s ease;
}

.hero-subtitle {
  font-size: 1.3em;
  font-weight: 400;
  color: rgba(255,255,255,0.9);
  margin: 0 0 20px;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero-description {
  font-size: 1em;
  color: rgba(255,255,255,0.8);
  margin: 0;
  animation: fadeInUp 1s ease 0.4s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Search - More inviting with emoji and glow */
.search-wrapper {
  text-align: center;
  margin-bottom: 40px;
}

#search, #faculty-search, #assignment-search {
  width: 100%;
  max-width: 600px;
  padding: 16px 20px 16px 50px;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

#search:focus, #faculty-search:focus, #assignment-search:focus {
  outline: none;
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3);
  transform: scale(1.02);
}

#search::placeholder, #faculty-search::placeholder, #assignment-search::placeholder {
  color: #999;
}

/* Grid - Responsive and animated */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

/* No results message */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

/* Cards - Vibrant, playful, with animations */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  animation: slideIn 0.6s ease-out both;
  display: flex;
  flex-direction: column;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}

.card:hover::before {
  left: 100%;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  border-color: #667eea;
}

.card:active {
  transform: translateY(-5px) scale(1.01);
}

.card-icon {
  font-size: 32px;
  margin-bottom: 12px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.card-content {
  flex: 1;
}

.code {
  font-weight: 600;
  color: #667eea;
  margin: 0 0 8px 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.title {
  color: #555;
  font-size: 16px;
  line-height: 1.4;
  margin: 0 0 12px 0;
  font-weight: 500;
}

.vibe-tag {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  align-self: flex-start;
  margin-top: auto;
}

.view-count {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
  color: #999;
  font-size: 14px;
}

.view-count .icon {
  margin-right: 4px;
  font-size: 16px;
}

/* Faculty-specific card styles */
.faculty-card .card-icon {
  font-size: 32px;
  color: #667eea;
}

.faculty-card .name {
  font-weight: 600;
  color: #333;
  margin: 0 0 4px;
  font-size: 18px;
}

.faculty-card .course {
  color: #666;
  font-size: 14px;
  margin-bottom: 8px;
}

.faculty-card .phone {
  color: #999;
  font-size: 14px;
  margin-bottom: 8px;
}

.faculty-card .rating {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: auto;
}

.faculty-card .stars {
  color: #ffd700;
  font-size: 18px;
}

/* Assignment-specific card styles */
.assignment-card .card-icon {
  font-size: 32px;
  color: #764ba2;
}

.assignment-card .assignment-link {
  color: #667eea;
  font-size: 14px;
  margin-top: 8px;
  text-decoration: none;
  font-weight: 500;
}

.assignment-card .assignment-link:hover {
  text-decoration: underline;
}

/* Calculator Sections */
.calculator-section {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px 20px;
  margin: 40px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  animation: fadeInUp 1s ease 0.6s both;
}

.section-hero {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.section-title {
  font-size: 2.2em;
  font-weight: 700;
  color: white;
  margin: 0 0 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-subtitle {
  font-size: 1.1em;
  color: rgba(255,255,255,0.9);
  margin: 0;
}

.calculator {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
  color: #333;
  max-width: 400px;
  margin: 0 auto;
}

.calculator h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 24px;
  color: #2a5298;
  font-weight: 600;
}

.input-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.input-group label {
  flex: 1;
  font-weight: 500;
  color: #555;
}

.input-group input, .input-group select, .input-group textarea {
  width: 60%;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ddd;
  text-align: left;
  background-color: #fff;
  color: #333;
  transition: border-color 0.3s;
  font-family: 'Poppins', sans-serif;
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
  outline: none;
  border-color: #667eea;
}

.calculator button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 5px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-weight: bold;
  cursor: pointer;
  margin-top: 20px;
  transition: transform 0.3s;
  font-family: 'Poppins', sans-serif;
}

.calculator button:hover {
  transform: scale(1.02);
}

#result {
  margin-top: 20px;
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  color: #2a5298;
  background: rgba(102, 126, 234, 0.1);
  padding: 10px;
  border-radius: 10px;
}

/* Attendance Specific */
.attendance-calc #attendance-result {
  text-align: center;
  margin-top: 20px;
}

.attendance-percent {
  font-size: 48px;
  font-weight: bold;
  color: #2a5298;
  margin-bottom: 10px;
}

#attendance-note {
  color: #666;
  font-size: 16px;
  margin: 0;
}

/* Assignment Section */
.assignment-section {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px 20px;
  margin: 40px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  animation: fadeInUp 1s ease 0.6s both;
}

/* Faculty Section */
.faculty-section {
  margin-top: 40px;
}

/* Request Section */
.request-section {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px 20px;
  margin: 40px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  animation: fadeInUp 1s ease 0.6s both;
}

.request-form {
  max-width: 500px;
  margin: 0 auto;
}

.request-form .input-group {
  flex-direction: column;
  align-items: flex-start;
}

.request-form .input-group label {
  flex: none;
  margin-bottom: 5px;
  color: #333;
}

.request-form .input-group input,
.request-form .input-group select,
.request-form .input-group textarea {
  width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .hero-title {
    font-size: 2.2em;
  }
  
  .hero-subtitle {
    font-size: 1.1em;
  }
  
  .top-nav {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }
  
  .nav-links {
    gap: 15px;
  }

  .input-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .input-group input, .input-group select, .input-group textarea {
    width: 100%;
    margin-top: 5px;
  }

  .calculator-section, .assignment-section, .request-section {
    padding: 20px 10px;
  }

  .attendance-percent {
    font-size: 36px;
  }

  .no-results {
    padding: 20px;
    font-size: 16px;
  }

  .dashboard-list {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
  }

  .modal-header {
    flex-direction: column;
    gap: 10px;
  }

  .close-btn {
    align-self: flex-end;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer label {
    justify-content: center;
  }
}