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

:root {
  --main-color: #cd0000;
  --dark-color: #333;
  --light-bg: #f8f9fa;
  --success-color: #4caf50;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  padding-bottom: 40px;
}

/* ====== HEADER ====== */
.header {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  width: 100%;
  padding: 20px 0;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.header .logo img {
  width: 90px;
  object-fit: cover;
  transition: all 0.4s ease;
  animation: float 3s ease-in-out infinite;
}

.header .logo img:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 6px 25px rgba(228, 0, 0, 0.5);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.header .name h1 {
  color: var(--main-color);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* ====== CONTAINER ====== */
.container {
  max-width: 700px;
  margin: 40px auto;
  padding: 50px 40px;
  background: #ffffff;
  border-radius: 25px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.container:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.container h1 {
  color: var(--main-color);
  font-size: 2.2rem;
  margin-bottom: 35px;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

.container h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--main-color), #cd0000);
  border-radius: 2px;
}

/* ====== INPUTS ====== */
.inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 35px;
}

.input-wrapper {
  position: relative;
}

.input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  border: 2px solid #e8e8e8;
  border-radius: 15px;
  font-size: 16px;
  font-family: inherit;
  text-align: right;
  transition: all 0.3s ease;
  background: #fafafa;
}

.input:focus {
  outline: none;
  border-color: var(--main-color);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 153, 0, 0.1);
  transform: translateY(-2px);
}

.input::placeholder {
  color: #aaa;
}

.icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  pointer-events: none;
  transition: all 0.3s ease;
}

.input:focus + .icon {
  transform: translateY(-50%) scale(1.2);
}

/* ✅ تأثير الخطأ على الـ input */
.input-error {
  border-color: #dc3545 !important;
  background: #fff5f5 !important;
  animation: shake 0.5s ease;
}

.input-error:focus {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.2) !important;
}

/* ✅ أنيميشن اهتزاز */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ====== RATING SECTION ====== */
label {
  display: block;
  margin-bottom: 12px;
  margin-top: 20px;
  font-weight: 600;
  color: var(--dark-color);
  font-size: 1.05rem;
}

input[type='range'] {
  width: 100%;
  height: 8px;
  border-radius: 10px;
  background: #e0e0e0;
  outline: none;
  -webkit-appearance: none;
  margin: 10px 0;
  cursor: pointer;
}

input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--main-color), #cd0000);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(228, 0, 0, 0.4);
  transition: all 0.3s ease;
}

input[type='range']::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 5px 15px rgba(228, 0, 0, 0.6);
}

input[type='range']::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--main-color), #cd0000);
  cursor: pointer;
  border: none;
  box-shadow: 0 3px 10px rgba(228, 0, 0, 0.4);
  transition: all 0.3s ease;
}

input[type='range']::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 5px 15px rgba(228, 0, 0, 0.6);
}

span[id$='Value'] {
  display: inline-block;
  min-width: 35px;
  padding: 6px 14px;
  background: var(--main-color);
  color: white;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1.1rem;
  margin-right: 10px;
  box-shadow: 0 2px 8px rgba(228, 0, 0, 0.3);
}

/* ====== BUTTON ====== */
button[type='submit'] {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--success-color), #45a049);
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

button[type='submit']:hover {
  background: linear-gradient(135deg, #45a049, #3d8b40);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

button[type='submit']:active {
  transform: translateY(-1px);
}

/* ====== MESSAGE ====== */
#message {
  margin-top: 25px;
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  font-size: 1.05rem;
  opacity: 0;
  transition: all 0.4s ease;
}

#message.show {
  opacity: 1;
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#message.success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  border: 2px solid #c3e6cb;
}

#message.error {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
  border: 2px solid #f5c6cb;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .header {
    padding: 15px 0;
  }

  .header-container {
    padding: 0 20px;
  }

  .header .logo img {
    width: 60px;
  }

  .header .name h1 {
    font-size: 1.3rem;
  }

  .container {
    margin: 20px;
    padding: 30px 20px;
  }

  .container h1 {
    font-size: 1.6rem;
  }

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

  button[type='submit'] {
    font-size: 1rem;
    padding: 14px;
  }

  label {
    font-size: 0.95rem;
  }

  span[id$='Value'] {
    font-size: 1rem;
    padding: 5px 12px;
  }
}

@media (max-width: 480px) {
  .header .name h1 {
    font-size: 1.1rem;
  }

  .container {
    padding: 25px 15px;
    margin: 15px;
  }

  .container h1 {
    font-size: 1.4rem;
  }

  .input {
    font-size: 14px;
    padding: 12px 45px 12px 15px;
  }

  .icon {
    font-size: 18px;
    right: 12px;
  }
}
/* ====== NOTES SECTION ====== */
.notes-section {
  margin-top: 30px;
  margin-bottom: 20px;
}

.notes-textarea {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #e8e8e8;
  border-radius: 15px;
  font-size: 16px;
  font-family: inherit;
  text-align: right;
  transition: all 0.3s ease;
  background: #fafafa;
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.notes-textarea:focus {
  outline: none;
  border-color: var(--main-color);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 153, 0, 0.1);
}

.notes-textarea::placeholder {
  color: #aaa;
}

/* Responsive */
@media (max-width: 768px) {
  .notes-textarea {
    font-size: 14px;
    padding: 12px 15px;
    min-height: 80px;
  }
}
