/* ===== CSS VARIABLES & RESET ===== */
:root {
  --primary: #3498db;
  --secondary: #2ecc71;
  --accent: #e74c3c;
  --dark: #2c3e50;
  --light: #ecf0f1;
  --gradient: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
  overflow-x: hidden;
}

/* ===== LAYOUT & CONTAINERS ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===== HEADER & NAVIGATION ===== */
header {
  background: var(--gradient);
  color: white;
  padding: 1rem 0;
  box-shadow: var(--shadow-light);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo h1 {
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a:focus {
  opacity: 0.8;
  outline: none;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a:focus::after {
  width: 100%;
}

.nav-button {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

/* ===== USER MENU ===== */
.user-menu {
  position: relative;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 4px;
  box-shadow: var(--shadow-medium);
  min-width: 150px;
  z-index: 1001;
  display: none;
}

.user-dropdown.show {
  display: block;
  animation: fadeIn 0.2s ease;
}

.user-dropdown a {
  color: var(--dark) !important;
  display: block;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.user-dropdown a:last-child {
  border-bottom: none;
}

.user-dropdown a:hover {
  background: #f8f9fa;
}

/* ===== HOME PAGE STYLES ===== */
.landingpage {
  text-align: center;
  padding: 8rem 2rem;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
              url('https://images.unsplash.com/photo-1552664730-d307ca884978?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
  background-size: cover;
  background-position: center;
  color: white;
  margin: 2rem auto;
  max-width: 800px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
}

.landingpage h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.landingpage p {
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0.9;
}

.cta-link {
  text-decoration: none;
}

.cta-button {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.cta-button:hover,
.cta-button:focus {
  background: #2980b9;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  outline: none;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
  margin: 3rem 2rem;
}

/* ===== SECTION STYLES ===== */
.section-title {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--dark);
  margin-bottom: 1rem;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
}

/* ===== FOOTER ===== */
footer {
  background: #1a1a1a;
  color: white;
  padding: 4rem 0 2rem;
}

.footer-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
}

.footer-column h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.footer-column p {
  color: #ccc;
  margin-bottom: 1rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 0.8rem;
}

.footer-column a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-column a:hover,
.footer-column a:focus {
  color: var(--primary);
  outline: none;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #333;
  max-width: 1400px;
  margin: 0 auto;
  color: #999;
  padding: 2rem 2rem 0;
}

.footer-bottom-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

/* ===== AUTHENTICATION MODAL ===== */
.auth-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.auth-content {
  background: white;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: var(--shadow-heavy);
}

.auth-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid #eee;
}

.auth-tab {
  flex: 1;
  padding: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.auth-tab.active {
  background: var(--light);
  color: var(--primary);
}

.auth-form {
  padding: 2rem;
  display: none;
}

.auth-form.active {
  display: block;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.auth-submit {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.auth-submit:hover {
  background: #2980b9;
}

.auth-switch {
  text-align: center;
  margin-top: 1rem;
}

.auth-switch a {
  color: var(--primary);
  text-decoration: none;
}

/* ===== FEEDBACK MODAL ===== */
.feedback-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease-out;
}

.feedback-modal.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 2.5rem;
  border-radius: 15px;
  text-align: center;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  position: relative;
  animation: slideUp 0.4s ease-out;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #7f8c8d;
  transition: color 0.3s;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #e74c3c;
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.modal-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.modal-text {
  color: #7f8c8d;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.modal-btn {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  min-width: 140px;
  font-size: 0.9rem;
}

.modal-btn-primary {
  background: var(--gradient);
  color: white;
}

.modal-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.modal-btn-secondary {
  background: #ecf0f1;
  color: #2c3e50;
}

.modal-btn-secondary:hover {
  background: #bdc3c7;
}

/* ===== FEEDBACK CORNER BUTTON ===== */
.feedback-corner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

.feedback-trigger {
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.feedback-trigger:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(30px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 1s ease-out;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 968px) {
  .landingpage h1 {
    font-size: 2.8rem;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-links {
    gap: 1.5rem;
  }
  
  .landingpage {
    padding: 4rem 1rem;
    margin: 1rem;
  }
  
  .landingpage h1 {
    font-size: 2.2rem;
  }
  
  .landingpage p {
    font-size: 1.1rem;
  }
  
  .container {
    padding: 3rem 1.5rem;
  }
  
  .modal-content {
    padding: 2rem 1.5rem;
  }
  
  .modal-buttons {
    flex-direction: column;
  }
  
  .modal-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .nav-links {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .landingpage h1 {
    font-size: 1.8rem;
  }
  
  .section-title h2 {
    font-size: 1.8rem;
  }
  
  .footer-bottom-links {
    flex-direction: column;
    gap: 1rem;
  }
  
  .feedback-trigger {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* Add to existing styles */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.notification {
    /* Notification styles as defined in collaboration.js */
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        width: 100%;
        text-align: center;
    }
    
    .user-menu {
        width: 100%;
    }
    
    .user-dropdown {
        position: static;
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* Collaboration Styles - Enhanced & Responsive */
.collaboration-hero {
    text-align: center;
    padding: 3rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: -2rem -1rem 3rem;
    border-radius: 0 0 20px 20px;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.collaboration-hero h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.collaboration-hero p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}