/* ========== CONTAINER ========== */
.broadcast-container {
  max-width: 1400px;
  padding: 0 20px;
  margin: 0 auto;
}

/* ========== HERO SECTION ========== */
.broadcast-hero {
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 80px 20px;
  border-radius: 24px;
  margin-bottom: 40px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

.hero-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 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='%23ffffff' fill-opacity='0.05'%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");
}

.hero-content-wrapper {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
}

.hero-icon-container {
  margin-bottom: 30px;
}

.icon-circle {
  width: 100px;
  height: 100px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  animation: float 3s ease-in-out infinite;
}

.icon-circle i {
  font-size: 3rem;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-main-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 15px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-description {
  font-size: 1.2rem;
  opacity: 0.95;
}

.floating-element {
  position: absolute;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float-random 15s ease-in-out infinite;
}

.element-1 { top: 10%; left: 5%; animation-delay: 0s; }
.element-2 { top: 60%; right: 10%; animation-delay: -5s; }
.element-3 { bottom: 20%; left: 15%; animation-delay: -10s; }

@keyframes float-random {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* ========== FORM CARD ========== */
.form-modern-card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.form-section {
  margin-bottom: 35px;
  padding-bottom: 35px;
  border-bottom: 2px solid #f0f0f0;
}

.form-section:last-of-type {
  border-bottom: none;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
}

.section-header i {
  font-size: 1.5rem;
  color: #667eea;
}

.section-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}

.form-group-modern {
  margin-bottom: 20px;
}

.form-label-modern {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 10px;
}

.modern-input,
.modern-select,
.modern-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
  box-sizing: border-box;
}

.modern-input:focus,
.modern-select:focus,
.modern-textarea:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.modern-textarea {
  resize: vertical;
  font-family: inherit;
}

.form-hint {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 8px;
}

.time-badge {
  background: #667eea;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
  margin-right: 10px;
}

/* ========== CUSTOM ID SECTION ========== */
.custom-id-section {
  background: #f8f9ff;
  border: 2px solid #e0e7ff;
  border-radius: 16px;
  padding: 20px;
  margin-top: 20px;
}

.custom-id-preview {
  background: #d1e7dd;
  border: 2px solid #a3cfbb;
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 12px;
  color: #0f5132;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========== BUTTON SECTION ========== */
.button-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ========== FORM ACTIONS ========== */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #f0f0f0;
}

.action-buttons-right {
  display: flex;
  gap: 12px;
}

.action-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-secondary-modern {
  background: #6c757d;
  color: white;
}

.btn-reset-modern {
  background: white;
  border: 2px solid #dee2e6;
  color: #495057;
}

.btn-submit-modern {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ========== INFO CARD ========== */
.info-card-modern {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(255, 193, 7, 0.2);
}

.info-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.info-header i {
  font-size: 1.8rem;
  color: #856404;
}

.info-header h4 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #856404;
  margin: 0;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  padding: 8px 0;
  color: #856404;
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-list li i {
  color: #28a745;
}

/* ========== TWO COLUMN LAYOUT ========== */
.broadcast-two-column-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 30px;
  align-items: start;
}

.form-column {
  min-width: 0;
}

.preview-column {
  position: relative;
}

.phone-preview-sticky {
  position: sticky;
  top: 20px;
}

/* ========== TELEGRAM SCREEN PREVIEW ========== */
.telegram-screen-preview {
  width: 100%;
  max-width: 400px;
  height: 700px;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.telegram-bg-full {
  width: auto;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 1;
  filter: drop-shadow(1px 1px 10px #222);
}

/* ========== MESSAGE PREVIEW ========== */
.message-preview-container {
  position: absolute;
  bottom: 80px;
  left: 50px;
  right: 30px;
  max-height: calc(100% - 160px);
  overflow-y: auto;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.message-bubble {
  background: linear-gradient(to right, #312622, #1c252c);
  border-radius: 18px 18px 18px 4px;
  padding: 0;
  max-width: 85%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow: hidden;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.preview-media-content {
  margin: 0;
  padding: 0;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  width: 100%;
}

.preview-media-content img,
.preview-media-content video {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: cover;
  display: block;
  border-radius: 0;
  margin: 0;
  padding: 0;
}

.preview-phone-document {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0;
}

.preview-phone-document i {
  font-size: 2rem;
  color: #ffffff;
}

.preview-phone-document span {
  font-weight: 600;
  color: #ffffff;
}

.preview-message-text {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  padding: 12px 16px;
  margin-top: 0;
}

.message-bubble:not(:has(.preview-media-content)) .preview-message-text {
  padding-top: 12px;
}

.message-bubble:has(.preview-media-content) .preview-message-text {
  padding-top: 8px;
}

.preview-message-text b {
  font-weight: 700;
  color: #ffffff;
}

.preview-message-text i {
  font-style: italic;
  color: #ffffff;
}

.preview-message-text code {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
  color: #ffffff;
}

.preview-message-text a {
  color: #5ba3e7;
  text-decoration: underline;
}

.preview-inline-button {
  background: linear-gradient(to right, #312622, #1c252c);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  max-width: 85%;
  position: relative;
  margin-top: 3px;
}

.preview-inline-button::after {
  content: '↗';
  font-size: 16px;
  color: #ffffff;
  margin-left: 4px;
  position: absolute;
  right: 12px;
}

.preview-inline-button i {
  color: #ffffff;
}

.preview-inline-button span {
  flex: 1;
  text-align: center;
  color: #ffffff;
  margin-right: 20px;
}

.preview-inline-button:hover {
  background: linear-gradient(to right, #3d2f2a, #243139);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.preview-empty-state {
  text-align: center;
  padding: 60px 40px 20px 0px;
  color: rgba(255, 255, 255, 0.5);
}

.preview-empty-state i {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.3;
}

.preview-empty-state p {
  font-size: 1rem;
  margin: 0;
}

.preview-label {
  text-align: center;
  margin-top: 20px;
  color: #667eea;
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ========== SCROLLBAR FOR PREVIEW ========== */
.message-preview-container::-webkit-scrollbar {
  width: 4px;
}

.message-preview-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.message-preview-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1400px) {
  .broadcast-two-column-layout {
    grid-template-columns: 1fr 360px;
  }
  
  .telegram-screen-preview {
    max-width: 360px;
    height: 650px;
  }
}

@media (max-width: 1200px) {
  .broadcast-two-column-layout {
    grid-template-columns: 1fr;
  }
  
  .preview-column {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero-main-title {
    font-size: 2rem;
  }
  
  .form-modern-card {
    padding: 20px;
  }
  
  .button-inputs-grid {
    grid-template-columns: 1fr;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 12px;
  }
  
  .action-buttons-right {
    width: 100%;
    flex-direction: column;
  }
  
  .action-btn {
    width: 100%;
    justify-content: center;
  }
}
