/* Stili per la sezione "Disegna Charlie" */

/* Logo testuale invece dell'immagine nell'header e footer */
.text-logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ff7b6b;
  text-decoration: none;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: inline-block;
  padding: 10px 0;
  position: relative;
}

.text-logo span {
  background: linear-gradient(to right, #ffb88c, #ff9a8b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.text-logo span::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 2px;
  background-image: linear-gradient(to right, #ffb88c, #ff9a8b);
  transform: scaleX(0.8);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.text-logo:hover span::after {
  transform: scaleX(1);
}

/* Stile per il logo nel footer */
.footer-text-logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(to right, #ffb88c, #ff9a8b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  margin-bottom: 15px;
}

/* Hero section */
.hero-section {
  background: linear-gradient(135deg, #fff5f0, #fff0eb);
  color: #333;
  text-align: center;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5z' fill='%23ffb88c' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.8;
}

.hero-section .container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.hero-content {
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(255, 154, 139, 0.15);
  border: 2px dashed rgba(255, 184, 140, 0.3);
}

.hero-decoration {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.hero-decoration i {
  font-size: 2.5rem;
  color: #ff9a8b;
  background: linear-gradient(to right, #ffb88c, #ff9a8b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 3px rgba(255, 154, 139, 0.3));
}

.hero-section h1 {
  font-size: 3.5rem;
  margin-bottom: 25px;
  color: #ff7b6b;
  font-weight: 700;
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8);
}

.hero-section h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-image: linear-gradient(to right, #ffb88c, #ff9a8b);
  border-radius: 2px;
}

.hero-section p {
  font-size: 1.4rem;
  max-width: 700px;
  margin: 25px auto 0;
  color: #666;
  line-height: 1.6;
}

/* Contest description */
.contest-description {
  padding: 60px 0;
  background-color: #fff9f5;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffb88c' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.4rem;
  color: #333;
  position: relative;
  display: inline-block;
  font-weight: 700;
  padding-bottom: 15px;
}

.section-title h2::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
  background-color: rgba(255, 184, 140, 0.3);
  border-radius: 2px;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-image: linear-gradient(to right, #ffb88c, #ff9a8b);
  border-radius: 2px;
}

.steps-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.step {
  flex: 1;
  min-width: 220px;
  max-width: 280px;
  text-align: center;
  padding: 20px;
  border-radius: 10px;
  background-color: #fff;
  border: 2px solid rgba(255, 184, 140, 0.3);
  box-shadow: 0 5px 15px rgba(255, 154, 139, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.step-icon {
  width: 80px;
  height: 80px;
  background-image: linear-gradient(to right bottom, #ffb88c, #ff9a8b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 5px 15px rgba(255, 154, 139, 0.3);
}

.step-icon i {
  font-size: 32px;
  color: #fff;
}

.step h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #333;
}

.step p {
  color: #666;
  line-height: 1.6;
}

/* Winners section */
.winners-section {
  padding: 60px 0;
  background-color: #fff5f0;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ff9a8b' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.winners-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}

.winner-card {
  position: relative;
  width: 280px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(255, 154, 139, 0.2);
  transition: all 0.3s ease;
  background-color: #fff;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.winner-card:hover {
  transform: translateY(-8px) rotateY(5deg);
  box-shadow: 0 15px 30px rgba(255, 154, 139, 0.3);
}

.winner-card.first-place {
  border: 4px solid gold;
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
}

.winner-card.first-place:hover {
  box-shadow: 0 15px 30px rgba(255, 215, 0, 0.4);
}

.winner-card.second-place {
  border: 4px solid silver;
  box-shadow: 0 8px 20px rgba(192, 192, 192, 0.3);
}

.winner-card.second-place:hover {
  box-shadow: 0 15px 30px rgba(192, 192, 192, 0.4);
}

.winner-card.third-place {
  border: 4px solid #cd7f32; /* bronze */
  box-shadow: 0 8px 20px rgba(205, 127, 50, 0.3);
}

.winner-card.third-place:hover {
  box-shadow: 0 15px 30px rgba(205, 127, 50, 0.4);
}

.winner-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 1.4rem;
  z-index: 1;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: 2px solid #fff;
}

.first-place .winner-badge {
  background-image: linear-gradient(to bottom right, #ffd700, #ffcc00);
}

.second-place .winner-badge {
  background-image: linear-gradient(to bottom right, #e0e0e0, #c0c0c0);
}

.third-place .winner-badge {
  background-image: linear-gradient(to bottom right, #cd7f32, #a05a2c);
}

.winner-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.winner-card:hover .winner-image {
  transform: scale(1.05);
}

.winner-info {
  padding: 18px;
  background-color: #fff;
  position: relative;
}

.winner-info h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: #333;
  font-weight: 600;
}

.winner-info p {
  color: #666;
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.winner-votes {
  display: flex;
  align-items: center;
  color: #ff9a8b;
  font-weight: 500;
  font-size: 1.1rem;
}

.winner-votes i {
  margin-right: 5px;
}

/* Upload section */
.upload-section {
  padding: 60px 0;
  background-color: #fffaf7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23ffb88c' fill-opacity='0.1'%3E%3Cpath d='M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.upload-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 35px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(255, 154, 139, 0.15);
  background-color: #fff;
  border: 1px solid rgba(255, 184, 140, 0.2);
}

.login-required-message {
  text-align: center;
  padding: 25px;
  background-color: #fff5f0;
  border-radius: 10px;
  border: 1px dashed rgba(255, 154, 139, 0.4);
  margin-bottom: 20px;
}

.login-required-message i {
  color: #ff9a8b;
  margin-right: 8px;
  font-size: 1.2rem;
}

.login-required-message a {
  color: #ff7b6b;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.3s ease;
}

.login-required-message a:hover {
  color: #ff5a4a;
}

.upload-form {
  margin-top: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}

.file-upload-container {
  position: relative;
  margin-bottom: 10px;
}

.file-upload-container input[type="file"] {
  width: 100%;
  padding: 10px 0;
}

.file-preview {
  margin-top: 10px;
  text-align: center;
}

.file-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 5px;
}

.file-info {
  font-size: 0.85rem;
  color: #6c757d;
}

.terms-checkbox {
  display: flex;
  align-items: center;
}

.terms-checkbox input {
  margin-right: 10px;
}

.terms-checkbox label {
  margin-bottom: 0;
}

.form-submit {
  text-align: center;
  margin-top: 30px;
}

.btn {
  display: inline-block;
  padding: 10px 25px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.primary-btn {
  background-image: linear-gradient(to right, #ffb88c, #ff9a8b);
  color: #fff;
  border: none;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(255, 154, 139, 0.3);
}

.primary-btn:hover {
  background-image: linear-gradient(to right, #ff9a8b, #ff7b6b);
  box-shadow: 0 6px 18px rgba(255, 154, 139, 0.4);
  transform: translateY(-2px);
}

.upload-status {
  margin-top: 20px;
  padding: 10px;
  border-radius: 5px;
  text-align: center;
}

.upload-status.success {
  background-color: #d4edda;
  color: #155724;
}

.upload-status.error {
  background-color: #f8d7da;
  color: #721c24;
}

/* Gallery section */
.gallery-section {
  padding: 60px 0;
  background-color: #fff5f0;
  background-image: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ff9a8b' fill-opacity='0.1'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.filter-controls {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.filter-btn {
  background-color: transparent;
  border: none;
  padding: 8px 15px;
  margin: 0 5px;
  cursor: pointer;
  font-size: 1rem;
  color: #666;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  color: #333;
}

.filter-btn.active {
  color: #3498db;
  border-bottom-color: #3498db;
}

.drawings-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin: 40px auto 30px;
  max-width: 1200px;
}

.drawing-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(255, 154, 139, 0.15);
  transition: all 0.3s ease;
  background-color: #fff;
  cursor: pointer;
  border: 1px solid rgba(255, 184, 140, 0.2);
}

.drawing-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 25px rgba(255, 154, 139, 0.25);
}

.drawing-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.drawing-card:hover .drawing-image {
  transform: scale(1.08);
}

.drawing-info {
  padding: 18px;
  background-color: #fff;
  border-top: 1px solid rgba(255, 184, 140, 0.1);
}

.drawing-info h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.drawing-info p {
  color: #666;
  margin-bottom: 12px;
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.drawing-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #777;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 184, 140, 0.2);
}

.drawing-votes {
  display: flex;
  align-items: center;
  font-weight: 500;
}

.drawing-votes i {
  color: #ff9a8b;
  margin-right: 5px;
}

.drawing-author {
  display: flex;
  align-items: center;
}

.drawing-author i {
  margin-right: 3px;
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.pagination-btn {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 6px;
  border-radius: 50%;
  background-color: #fff;
  color: #333;
  border: 2px solid rgba(255, 184, 140, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 3px 10px rgba(255, 154, 139, 0.1);
}

.pagination-btn:hover {
  background-color: #fff5f0;
  border-color: rgba(255, 184, 140, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 154, 139, 0.15);
}

.pagination-btn.active {
  background-image: linear-gradient(to right, #ffb88c, #ff9a8b);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 5px 15px rgba(255, 154, 139, 0.3);
}

.pagination-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background-color: #f9f9f9;
  border-color: #eee;
  box-shadow: none;
}

/* My drawings section */
.my-drawings-section {
  padding: 60px 0;
  background-color: #fffaf7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='24' viewBox='0 0 88 24'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23ffb88c' fill-opacity='0.1'%3E%3Cpath d='M4 0h80v24H4V0zm76 4h-4v4h4V4zm0 12h-4v4h4v-4zm-12-8h4v4h-4V8zm12 0h-4v4h4V8zM28 8h4v4h-4V8zm-4 4h-4v4h4v-4zm32-8h4v4h-4V4zm-16 0h4v4h-4V4zM8 12h4v4H8v-4zm20 8h-4v4h4v-4zm-12-8h4v4h-4v-4zm12 0h-4v4h4v-4zm-8-8h4v4h-4V4zm8 0h-4v4h4V4zm24 8h4v4h-4v-4zm0-8h4v4h-4V4z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.my-drawings-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
}

.my-drawing-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background-color: #fff;
}

.my-drawing-status {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  color: #fff;
  z-index: 1;
}

.status-pending {
  background-color: #ffc107;
}

.status-approved {
  background-color: #28a745;
}

.my-drawing-actions {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  background-color: #f8f9fa;
}

.my-drawing-actions button {
  background-color: transparent;
  border: none;
  color: #6c757d;
  cursor: pointer;
  transition: color 0.3s ease;
}

.my-drawing-actions button:hover {
  color: #dc3545;
}

/* Drawing modal */
.drawing-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  overflow-y: auto;
}

.modal-content {
  position: relative;
  background-color: #fff;
  margin: 50px auto;
  padding: 0;
  width: 90%;
  max-width: 900px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(255, 154, 139, 0.25);
  animation: modalFadeIn 0.4s;
  border: 1px solid rgba(255, 184, 140, 0.2);
  overflow: hidden;
}

@keyframes modalFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-50px) scale(0.95);
  }
  70% {
    opacity: 1;
    transform: translateY(10px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #ff9a8b;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(255, 154, 139, 0.2);
  border: 2px solid rgba(255, 184, 140, 0.2);
  transition: all 0.3s ease;
}

.close-modal:hover {
  color: #ff7b6b;
  transform: rotate(90deg);
  box-shadow: 0 4px 12px rgba(255, 154, 139, 0.3);
}

.modal-body {
  padding: 30px;
  background-color: #fffaf7;
}

.drawing-detail {
  display: flex;
  flex-direction: column;
}

.drawing-detail-image {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  margin-bottom: 20px;
}

.drawing-detail-info h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #333;
}

.drawing-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
  color: #666;
}

.drawing-detail-meta span {
  display: flex;
  align-items: center;
}

.drawing-detail-meta i {
  margin-right: 5px;
}

.drawing-detail-description {
  margin-bottom: 20px;
  line-height: 1.6;
  color: #555;
}

.vote-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  text-align: center;
}

.vote-button {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background-color: #3498db;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.vote-button:hover {
  background-color: #2980b9;
}

.vote-button:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.vote-button i {
  margin-right: 8px;
}

.vote-status {
  margin-top: 10px;
  font-style: italic;
  color: #666;
}

/* Terms modal */
.terms-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  overflow-y: auto;
}

.terms-content {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 5px;
  background-color: #f9f9f9;
}

.terms-content h3 {
  margin-top: 20px;
  margin-bottom: 10px;
  color: #333;
}

.terms-content p {
  margin-bottom: 15px;
  line-height: 1.6;
  color: #555;
}

/* Loading spinner */
.loading-spinner {
  text-align: center;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loading-spinner i {
  font-size: 2.5rem;
  color: #ff9a8b;
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.2);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

/* Responsive styles */
@media (max-width: 992px) {
  .hero-content {
    padding: 30px;
  }
  
  .step {
    min-width: 45%;
    margin-bottom: 20px;
  }
  
  .drawings-container {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    padding: 0 20px;
  }
  
  .winners-container {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 60px 0;
  }
  
  .hero-section h1 {
    font-size: 2.5rem;
  }
  
  .hero-decoration {
    gap: 20px;
  }
  
  .hero-decoration i {
    font-size: 2rem;
  }
  
  .step {
    min-width: 100%;
  }
  
  .drawings-container {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
  
  .drawing-detail {
    flex-direction: column;
  }
  
  .drawing-detail-image {
    max-height: 300px;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .hero-content {
    padding: 25px 20px;
  }
  
  .hero-section h1 {
    font-size: 2.2rem;
  }
  
  .hero-section p {
    font-size: 1.1rem;
  }
  
  .winners-container {
    flex-direction: column;
    align-items: center;
  }
  
  .winner-card {
    width: 100%;
    max-width: 320px;
    margin-bottom: 20px;
  }
  
  .pagination-btn {
    width: 35px;
    height: 35px;
    margin: 0 3px;
    font-size: 0.9rem;
  }
  
  .drawings-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .drawing-image {
    height: 200px;
  }
}

/* ***** NUOVI STILI PER TEMPLATE E COMPLETAMENTO ***** */

/* Mode selector */
.mode-selector {
  text-align: center;
  margin: 2rem 0;
}

.mode-tabs {
  display: inline-flex;
  background: #f8f9fa;
  border-radius: 50px;
  padding: 5px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mode-tab {
  padding: 12px 24px;
  border: none;
  background: transparent;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  color: #666;
}

.mode-tab.active {
  background: linear-gradient(135deg, #a8e063, #56ab2f);
  color: white;
  box-shadow: 0 2px 8px rgba(168, 224, 99, 0.3);
}

.mode-tab:hover:not(.active) {
  background: rgba(168, 224, 99, 0.1);
  color: #56ab2f;
}

/* Hidden class */
.hidden {
  display: none !important;
}

/* Templates section */
.templates-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.templates-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.template-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  position: relative;
}

.template-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.template-image-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.template-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.template-card:hover .template-image {
  transform: scale(1.05);
}

.template-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.template-card:hover .template-overlay {
  opacity: 1;
}

.template-overlay .btn {
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 20px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.template-info {
  padding: 1.5rem;
}

.template-info h3 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
  font-size: 1.1rem;
  font-weight: 600;
}

.template-info p {
  margin: 0 0 1rem 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
}

.template-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #888;
}

.template-author {
  font-weight: 500;
  color: #56ab2f;
}

/* Modal completamento */
.modal-content.large {
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
}

.template-preview {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.template-preview h3 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  font-size: 1.2rem;
}

.template-info {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.template-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.template-details h4 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
  font-size: 1.1rem;
}

.template-details p {
  margin: 0 0 1rem 0;
  color: #666;
  line-height: 1.5;
}

.download-template {
  margin-top: 1rem;
}

.download-template .btn {
  margin-bottom: 0.5rem;
}

.template-help {
  font-size: 0.85rem;
  color: #888;
  margin: 0.5rem 0 0 0;
  font-style: italic;
}

/* User info section per completamento */
.user-info-section {
  background-color: #f0fff8;
  border: 2px dashed rgba(168, 224, 99, 0.4);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
  position: relative;
}

.user-info-section::before {
  content: 'ℹ️ Informazioni personali';
  position: absolute;
  top: -10px;
  left: 15px;
  background: #f0fff8;
  padding: 0 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #56ab2f;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .template-info {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .templates-container {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }
}