/* ========== Bottles (Messages in a Bottle) - New Modern Design ========== */

.bottles-page-new {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  min-height: calc(100vh - 80px);
  background: var(--bg-primary) !important;
  display: flex !important;
  flex-direction: column;
}

/* Header Section */
.bottles-header-new {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 50px;
  padding: 40px 30px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(167, 139, 250, 0.05) 100%);
  border-radius: 20px;
  border: 2px solid rgba(139, 92, 246, 0.3);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.bottles-header-new:hover {
  border-color: rgba(139, 92, 246, 0.6);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(167, 139, 250, 0.1) 100%);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.15);
}

.bottles-header-content h1 {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-tertiary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bottles-header-content p {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
  font-style: italic;
  line-height: 1.5;
  font-weight: 500;
}

/* Write Button */
.bottles-write-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #a78bfa 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.bottles-write-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.5);
}

.bottles-write-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(139, 92, 246, 0.4);
}

.bottles-write-btn svg {
  width: 18px;
  height: 18px;
}

/* Feed Container */
.bottles-feed-container {
  position: relative;
  min-height: 200px;
  background: var(--bg-primary);
  border-radius: 16px;
}

/* Feed Grid */
.bottles-feed-grid {
  display: grid;
  gap: 30px;
  margin-bottom: 40px;
}

/* Bottle Card Styles - Modern Dark Theme */
.bottle-card {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 16px;
  padding: 24px;
  max-width: 100%;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.15);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.bottle-card::before {
  content: '🍾';
  position: absolute;
  font-size: 100px;
  opacity: 0.05;
  top: -20px;
  right: -20px;
  z-index: 0;
  pointer-events: none;
}

.bottle-card:hover {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 16px 48px rgba(139, 92, 246, 0.25);
  transform: translateY(-4px);
  background: linear-gradient(135deg, rgba(26, 13, 46, 0.8) 0%, rgba(45, 27, 78, 0.8) 100%);
}

/* Card Top - Header with avatar and delete */
.bottle-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  position: relative;
  z-index: 1;
}

.bottle-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  transition: all 0.3s ease;
}

.bottle-card:hover .bottle-avatar {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.5);
}

.bottle-header-info {
  flex: 1;
  min-width: 0;
}

.bottle-sender {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.3px;
}

.bottle-time {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 4px 0 0 0;
  font-weight: 500;
}

.bottle-delete {
  background: rgba(255, 59, 48, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255, 59, 48, 0.3);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
  flex-shrink: 0;
  font-weight: 600;
}

.bottle-delete:hover {
  background: rgba(255, 59, 48, 0.25);
  border-color: rgba(255, 59, 48, 0.6);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

.bottle-delete:active {
  transform: rotate(90deg) scale(0.95);
}

/* Message Content */
.bottle-message {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
  margin: 20px 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Georgia', serif;
  position: relative;
  z-index: 1;
  letter-spacing: 0.3px;
  font-weight: 400;
}

/* Stats */
.bottle-stats {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 16px 0;
  padding: 12px 0;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  gap: 16px;
  position: relative;
  z-index: 1;
  font-weight: 500;
}

.bottle-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Actions */
.bottle-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

.bottle-btn-reply {
  flex: 1;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #a78bfa 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.bottle-btn-reply:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.5);
}

.bottle-btn-reply:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

/* Loading State */
.bottles-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.bottles-loading.hidden {
  display: none;
}

.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(30, 176, 192, 0.2);
  border-top-color: #1eb0c0;
  border-radius: 50%;
  animation: spin-animation 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin-animation {
  to {
    transform: rotate(360deg);
  }
}

/* Empty State */
.bottles-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.bottles-empty.hidden {
  display: none;
}

.empty-icon {
  font-size: 60px;
  margin-bottom: 20px;
  opacity: 0.6;
}

.bottles-empty h3 {
  font-size: 20px;
  margin: 0 0 10px 0;
  color: var(--text-primary);
  font-weight: 600;
}

.bottles-empty p {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
}

/* ========== MODAL STYLES ========== */

.modal-overlay-new {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay-new.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.modal-overlay-new.active {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}

.modal-new {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 20px;
  padding: 0;
  position: relative;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(139, 92, 246, 0.2), 0 0 40px rgba(139, 92, 246, 0.1);
  animation: modal-slide-in 0.3s ease;
  backdrop-filter: blur(10px);
}

@keyframes modal-slide-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.bottles-modal {
  display: flex;
  flex-direction: column;
}

.modal-header-new {
  padding: 25px 30px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header-new h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-tertiary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-close-new {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
  font-weight: 600;
}

.modal-close-new:hover {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.modal-close-new:active {
  transform: rotate(90deg) scale(0.95);
}

/* Form Styles */
.bottles-form-new {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field.full-width {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-field textarea {
  padding: 14px 16px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.05);
  color: var(--text-primary);
  font-family: 'Georgia', serif;
  font-size: 15px;
  transition: all 0.3s ease;
  resize: vertical;
  min-height: 150px;
  line-height: 1.8;
  font-weight: 400;
}

.form-field textarea::placeholder {
  color: var(--text-secondary);
  font-weight: 400;
}

.form-field textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(139, 92, 246, 0.1);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.char-count {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: right;
  margin-top: 4px;
}

.char-count.warning {
  color: #ffa500;
  font-weight: 600;
}

.char-count.error {
  color: #ff6b6b;
  font-weight: 600;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  border-top: 1px solid rgba(30, 176, 192, 0.1);
  padding-top: 20px;
}

.btn-cancel,
.btn-submit {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.btn-cancel {
  background: rgba(139, 92, 246, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.btn-cancel:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.btn-cancel:active {
  transform: translateY(0);
}

.btn-submit {
  background: linear-gradient(135deg, var(--primary-color) 0%, #a78bfa 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  border: none;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.5);
}

.btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
  .bottles-page-new {
    padding: 15px;
  }

  .bottles-header-new {
    flex-direction: column;
    gap: 20px;
    padding: 30px 20px;
  }

  .bottles-header-content h1 {
    font-size: 28px;
  }

  .bottles-write-btn {
    width: 100%;
    justify-content: center;
  }

  .bottle-card {
    padding: 24px;
    max-width: 100%;
  }

  .bottle-card-content {
    font-size: 15px;
    line-height: 1.6;
  }

  .bottles-feed-grid {
    gap: 20px;
  }

  .modal-new {
    max-width: 95%;
  }

  .modal-header-new {
    padding: 20px;
  }

  .bottles-form-new {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .bottles-page-new {
    padding: 10px;
  }

  .bottles-header-new {
    padding: 20px 15px;
  }

  .bottles-header-content h1 {
    font-size: 24px;
  }

  .bottles-header-content p {
    font-size: 14px;
  }

  .bottles-write-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .bottle-card {
    padding: 20px;
    margin: 0;
  }

  .bottle-card-content {
    font-size: 14px;
  }

  .bottle-card-title {
    font-size: 16px;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn-cancel,
  .btn-submit {
    width: 100%;
  }

  .modal-new {
    max-width: 100%;
    border-radius: 12px;
  }

  .modal-header-new {
    padding: 15px;
  }

  .modal-header-new h2 {
    font-size: 18px;
  }

  .bottles-form-new {
    padding: 15px;
    gap: 15px;
  }

  .form-field textarea {
    min-height: 120px;
  }
}
