/* ================ ROOT VARIABLES ================ */
:root {
  --primary: #6a11cb;
  --primary-dark: #4d0b9c;
  --secondary: #2575fc;
  --accent: #ff6b6b;
  --dark: #1a1a2e;
  --light: #f8f9fa;
  --gray: #6c757d;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* ================ BASE STYLES ================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: #f5f7fa;
  overflow-x: hidden;
}

/* ================ PAGE FRAMES ================ */
.page-frame {
  position: fixed;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  z-index: 1000;
  pointer-events: none;
}

.top-frame, .bottom-frame {
  height: 10px;
  left: 0;
  right: 0;
}

.left-frame, .right-frame {
  width: 10px;
  top: 0;
  bottom: 0;
}

.top-frame { top: 0; }
.right-frame { right: 0; }
.bottom-frame { bottom: 0; }
.left-frame { left: 0; }

/* Corner decorations */
.page-frame::before, .page-frame::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border: 3px solid var(--accent);
}

.top-frame::before {
  left: 30px;
  border-right: none;
  border-bottom: none;
  border-radius: 8px 0 0 0;
}
.top-frame::after {
  right: 30px;
  border-left: none;
  border-bottom: none;
  border-radius: 0 8px 0 0;
}

.bottom-frame::before {
  left: 30px;
  border-right: none;
  border-top: none;
  border-radius: 0 0 0 8px;
}
.bottom-frame::after {
  right: 30px;
  border-left: none;
  border-top: none;
  border-radius: 0 0 8px 0;
}

/* ================ BACKGROUND ORNAMENTS ================ */
.ornament {
  position: absolute;
  opacity: 0.08;
  z-index: -1;
  color: var(--primary);
  animation: float 6s ease-in-out infinite;
}

.ornament-1 {
  top: 15%;
  left: 8%;
  font-size: 12rem;
  transform: rotate(-15deg);
  animation-delay: 0s;
}

.ornament-2 {
  bottom: 25%;
  right: 7%;
  font-size: 10rem;
  transform: rotate(25deg);
  animation-delay: 1s;
}

.ornament-3 {
  top: 60%;
  left: 10%;
  font-size: 8rem;
  transform: rotate(10deg);
  animation-delay: 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-15deg); }
  50% { transform: translateY(-20px) rotate(-20deg); }
}

/* ================ HERO SECTION ================ */
.hero {
  position: relative;
  height: 90vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
  background: 
    linear-gradient(135deg, rgba(106, 17, 203, 0.9), rgba(37, 117, 252, 0.9)),
    url('https://images.unsplash.com/photo-1497366754035-f200968a6e72?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  opacity: 0.8;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 20px;
  animation: fadeInUp 1s ease-out;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

.tagline {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  margin-bottom: 2.5rem;
  opacity: 0.9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 1s ease-out 0.3s forwards;
  opacity: 0;
}

/* ================ CONTAINERS ================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.form-container {
  max-width: 800px;
  margin: -80px auto 60px;
  background: white;
  padding: 50px;
  border-radius: 15px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 3;
}

/* ================ BUTTONS ================ */
.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  background: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-block {
  display: block;
  width: 100%;
}

.cta-button {
  background: var(--accent);
  padding: 18px 35px;
  font-size: 1.1rem;
}

.cta-button:hover {
  background: #ff5252;
}

.admin-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--dark);
  padding: 15px 25px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 100;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* ================ FORM ELEMENTS ================ */
.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  color: var(--dark);
  font-size: 1.05rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 15px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 16px;
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

.form-group textarea {
  min-height: 180px;
  resize: vertical;
}

/* ================ ALERTS & MESSAGES ================ */
.alert {
  padding: 18px;
  border-radius: 8px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
}

.alert i {
  font-size: 1.3rem;
}

.alert-success {
  background-color: #e8f5e9;
  color: var(--success);
  border-left: 4px solid var(--success);
}

.alert-error {
  background-color: #ffebee;
  color: var(--danger);
  border-left: 4px solid var(--danger);
}

/* ================ FEATURES SECTION ================ */
.features {
  padding: 80px 0;
  background: white;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.feature-card {
  background: white;
  padding: 40px 30px;
  border-radius: 10px;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 5px 15px rgba(106, 17, 203, 0.2);
}

.feature-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--dark);
}

/* ================ COMPLAINT CARDS ================ */
.complaint-card {
  background: white;
  padding: 25px;
  margin-bottom: 25px;
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  border-left: 4px solid var(--primary);
}

.complaint-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.complaint-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.complaint-name {
  font-weight: 600;
  color: var(--dark);
  font-size: 1.2rem;
}

.complaint-date {
  color: var(--gray);
  font-size: 0.9rem;
}

.complaint-email {
  color: var(--primary);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.complaint-text {
  white-space: pre-wrap;
  line-height: 1.7;
  color: #444;
}

/* ================ ADMIN DASHBOARD ================ */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

.stats-card {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  text-align: center;
  margin-bottom: 30px;
}

.stats-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

/* ================ ANIMATIONS ================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

/* ================ RESPONSIVE DESIGN ================ */
@media (max-width: 992px) {
  .hero {
    height: auto;
    padding: 120px 0;
  }
  
  .form-container {
    margin-top: -60px;
    padding: 40px;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.8rem;
  }
  
  .tagline {
    font-size: 1.3rem;
  }
  
  .form-container {
    padding: 30px;
    margin-top: -40px;
    margin-bottom: 40px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .page-frame::before, 
  .page-frame::after {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 100px 0;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .btn, .cta-button {
    padding: 14px 25px;
    font-size: 15px;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 12px;
  }
  
  .admin-btn {
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    font-size: 14px;
  }
}