@font-face {
  font-family: "SVN-Beloved";
  src: url("./assets/font/SVN-Beloved/SVN-Beloved.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "SVN-Times New Roman";
  src: url("./assets/font/SVN-Times New Roman/SVN-Times New Roman.ttf")
    format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "SVN-Times New Roman";
  src: url("./assets/font/SVN-Times New Roman/SVN-Times New Roman Bold.ttf")
    format("truetype");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "SVN-Times New Roman";
  src: url("./assets/font/SVN-Times New Roman/SVN-Times New Roman Italic.ttf")
    format("truetype");
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: "SVN-Times New Roman";
  src: url("./assets/font/SVN-Times New Roman/SVN-Times New Roman Bold Italic.ttf")
    format("truetype");
  font-weight: bold;
  font-style: italic;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

@media screen and (max-width: 600px) {
  body {
    padding: 0px;
    background: #fff;
  }
  .main-content {
    display: flex;
    flex-direction: column;
    padding: 6px !important;
    margin: 0;
  }
  .form-section {
    padding: 9px !important;
  }
}

.container-fluid {
  max-width: 100vw;
  margin: 0 auto;
  /* background: rgba(255, 255, 255, 0.95); */
  border-radius: 20px;
  /* box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); */
  overflow: hidden;
  /* backdrop-filter: blur(10px); */
}

.header {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  text-align: center;
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.1) 2px,
    rgba(255, 255, 255, 0.1) 4px
  );
  animation: slide 20s linear infinite;
}

@keyframes slide {
  0% {
    transform: translateX(-50px) translateY(-50px);
  }
  100% {
    transform: translateX(50px) translateY(50px);
  }
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
  font-size: 1.1rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 40px;
  padding: 40px;
}

.form-section {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-section h2 {
  color: #333;
  margin-bottom: 25px;
  font-size: 1.5rem;
  border-bottom: 3px solid #4facfe;
  padding-bottom: 10px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4facfe;
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
  transform: translateY(-2px);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input[type="number"] {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input[type="number"]:focus {
  outline: none;
  border-color: #4facfe;
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
  transform: translateY(-2px);
}

.char-counter {
  text-align: right;
  font-size: 0.85rem;
  color: #888;
  margin-top: 5px;
}

.char-counter.warning {
  color: #ff6b6b;
}

.avatar-upload {
  text-align: center;
  margin-bottom: 25px;
}

.avatar-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #4facfe;
  margin: 0 auto 15px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
}

.avatar-preview:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(79, 172, 254, 0.3);
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  color: #ccc;
  font-size: 3rem;
}

.upload-btn {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.btn {
  flex: 1;
  padding: 15px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  color: #8b4513;
  box-shadow: 0 4px 15px rgba(252, 182, 159, 0.3);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.preview-section {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.preview-section h2 {
  color: #333;
  margin-bottom: 25px;
  font-size: 1.5rem;
  border-bottom: 3px solid #4facfe;
  padding-bottom: 10px;
}

.message-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.message-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.message-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.message-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  margin-right: 15px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-info h3 {
  margin: 0;
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.message-info p {
  margin: 0;
  opacity: 0.8;
  font-size: 0.9rem;
}

.message-content {
  position: relative;
  z-index: 1;
  line-height: 1.6;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.empty-preview {
  text-align: center;
  color: #888;
  font-style: italic;
  padding: 40px;
  border: 2px dashed #ddd;
  border-radius: 10px;
}

.color-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  padding: 8px 12px;
  transition: all 0.3s ease;
  background: white;
}

.color-input-wrapper:focus-within {
  border-color: #4facfe;
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
  transform: translateY(-2px);
}

.color-input {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: transform 0.2s ease;
}

.color-input:hover {
  transform: scale(1.1);
}

.color-preview {
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  flex: 1;
  text-align: center;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e1e5e9;
}

@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .action-buttons {
    flex-direction: column;
  }
}

.hidden {
  display: none;
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

.message-wrapper {
  padding: 20px 20px;
}

#messagePreview {
  font-family: "SVN-Times New Roman", "Segoe UI", Tahoma, Geneva, Verdana,
    sans-serif;
  font-size: 22px;
  line-height: 1.4;
  font-weight: 500;
  color: #002bff;
  word-wrap: break-word;
  text-align: justify;
}

@media screen and (max-width: 600px) {
  /* #messagePreview {
    font-size: 4px !important;
  } */
  /* .message-wrapper {
    padding: 8px !important;
    border-radius: 0 !important;
  }
  #signatureWrapper {
    font-size: 6px !important;
  } */
  .hidden-modal-preview {
    width: 1980px !important;
  }
}
#avatarPreview {
  background-size: cover;
  background-position: center;
  display: block;
  z-index: 10;
}

#avatarWrapper {
  z-index: 100;
}

.preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.preview-modal.active {
  opacity: 1;
  visibility: visible;
}

.preview-modal-content {
  max-width: 90vw;
  max-height: 90vh;
  background: white;
  border-radius: 10px;
  overflow: auto;
  padding: 20px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.preview-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  z-index: 1001;
}

.preview-close:hover {
  color: #000;
}

#previewContainer.modal-preview {
  width: 600px;
  max-width: 100%;
}

#signatureWrapper {
  font-family: "SVN-Times New Roman", "Segoe UI", Tahoma, Geneva, Verdana,
    sans-serif;
  font-size: 22px;
  font-weight: 600;
}
.hidden-modal-preview {
  width: 100vw;
}

#modalPreviewContainer #messagePreview {
  font-family: "SVN-Times New Roman", "Segoe UI", Tahoma, Geneva, Verdana,
    sans-serif !important;
  font-size: 6px !important;
  border-radius: 0 !important;
}
#modalPreviewContainer .message-wrapper {
  padding: 4px !important;
  border-radius: 0 !important;
}
#modalPreviewContainer #signatureWrapper {
  font-family: "SVN-Times New Roman", "Segoe UI", Tahoma, Geneva, Verdana,
    sans-serif !important;
  font-size: 6px !important;
}
