* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow-x: hidden;
  background-attachment: fixed;
}

.container {
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  text-align: center;
}

/* Water-like shadow container */
.water-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1),
    inset 0 0 20px rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.water-container::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 60%
  );
  animation: waterEffect 8s infinite linear;
  z-index: -1;
}

@keyframes waterEffect {
  0% {
    transform: rotate(0deg) translate(0, 0);
  }
  100% {
    transform: rotate(360deg) translate(0, 0);
  }
}

/* Header with 3D effect */
.header {
  margin-bottom: 25px;
  position: relative;
}

.header h1 {
  font-size: 2.8rem;
  margin-bottom: 10px;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), 0 4px 20px rgba(0, 0, 0, 0.15),
    0 6px 30px rgba(0, 0, 0, 0.1);
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
  transform: perspective(500px) rotateX(15deg);
}

.header h1::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 10%;
  width: 80%;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.7),
    transparent
  );
  border-radius: 50%;
}

.header p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* 3D input field */
.input-container {
  position: relative;
  margin: 25px 0;
}

#url {
  width: 100%;
  padding: 16px 20px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  color: white;
  font-size: 1rem;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1),
    0 5px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

#url::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

#url:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 2px 15px rgba(0, 0, 0, 0.2),
    0 8px 25px rgba(0, 0, 0, 0.25);
}

/* 3D Button */
.btn-3d {
  position: relative;
  display: inline-block;
  padding: 16px 45px;
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
  border: none;
  border-radius: 50px;
  color: #764ba2;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transform: perspective(500px) rotateX(15deg);
  box-shadow: 0 10px 0 #d57a7e, 0 15px 20px rgba(0, 0, 0, 0.3),
    inset 0 3px 0 rgba(255, 255, 255, 0.4);
  transition: all 0.2s ease;
  overflow: hidden;
  margin: 15px 0;
}

.btn-3d:hover {
  transform: perspective(500px) rotateX(15deg) translateY(-3px);
  box-shadow: 0 13px 0 #d57a7e, 0 18px 25px rgba(0, 0, 0, 0.35),
    inset 0 3px 0 rgba(255, 255, 255, 0.4);
}

.btn-3d:active {
  transform: perspective(500px) rotateX(15deg) translateY(5px);
  box-shadow: 0 5px 0 #d57a7e, 0 8px 10px rgba(0, 0, 0, 0.3),
    inset 0 3px 0 rgba(255, 255, 255, 0.4);
}

.btn-3d::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: 0.5s;
}

.btn-3d:hover::before {
  left: 100%;
}

/* Output area */
.output {
  width: 100%;
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  transition: all 0.5s ease;
}

.caption-box {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  padding: 18px;
  margin-top: 15px;
  border-radius: 15px;
  width: 100%;
  font-size: 15px;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15),
    inset 0 0 10px rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.caption-box blockquote {
  margin: 0;
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

video,
img.media {
  max-width: 100%;
  margin-top: 20px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 6px 10px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.loading {
    text-align: center;
    padding: 30px;
    color: #ffffff;
    font-size: 16px;
}

.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.download-info {
    margin-top: 15px;
}

.download-btn {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #0056b3;
}

/* Footer with 3D effect */
.footer {
  width: 100%;
  text-align: center;
  margin-top: 40px;
  padding: 30px 20px;
  position: relative;
}

.footer-content {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25),
    inset 0 0 15px rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.developer-name {
  font-size: 2.2rem;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 2px 0 #764ba2, 0 4px 0 rgba(118, 75, 162, 0.7),
    0 6px 0 rgba(118, 75, 162, 0.5), 0 8px 0 rgba(118, 75, 162, 0.3),
    0 10px 20px rgba(0, 0, 0, 0.4);
  transform: perspective(500px) rotateX(20deg);
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.copyright {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  margin-top: 10px;
}

/* Animation for processing */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
}

.processing {
  animation: pulse 1.5s infinite;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.media-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 500px;
  margin: 15px 0;
}

.error-box {
  background: rgba(255, 100, 100, 0.2);
  backdrop-filter: blur(5px);
  padding: 15px;
  border-radius: 15px;
  width: 100%;
  font-size: 15px;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15),
    inset 0 0 10px rgba(255, 100, 100, 0.3);
  border: 1px solid rgba(255, 100, 100, 0.3);
}

/* Responsive design */
@media (max-width: 600px) {
  .header h1 {
    font-size: 2.2rem;
  }

  .developer-name {
    font-size: 1.8rem;
  }

  .water-container {
    padding: 20px 15px;
  }

  .btn-3d {
    padding: 14px 30px;
    font-size: 1.1rem;
  }
}

/* Enhanced Credits Styling */
.credits-container {
  text-align: center;
  margin: 20px 0;
}

.credits-panel {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 15px;
  display: inline-block;
  min-width: 250px;
}

.credits-display {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 8px;
}

.reset-timer {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 5px;
}

.total-earned {
  font-size: 12px;
  opacity: 0.8;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 30px;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  position: relative;
}

.close {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #000;
  background: transparent;
  border: none;
}

.btn-small {
  padding: 5px 10px;
  margin: 0 5px;
  font-size: 12px;
  border: none;
  border-radius: 4px;
  background: #007bff;
  color: white;
  cursor: pointer;
}

.btn-small:hover {
  background: #0056b3;
}

.modal-content{
  color: black;
}

/* Earn Methods Styling */
.earn-methods {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px 0;
}

.method-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px 20px;
  border-radius: 15px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease;
  min-width: 200px;
}

.method-card:hover {
  transform: translateY(-5px);
}

.method-card h3 {
  margin: 15px 0 10px 0;
}

.method-card p {
  margin: 10px 0;
  opacity: 0.9;
}

.reward {
  background: rgba(255,255,255,0.2);
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
  margin-top: 15px;
}

/* Visit Links Styling */
.visit-links-list {
  max-height: 400px;
  overflow-y: auto;
}

.timer-display {
  background: #f0f0f0;
  padding: 10px;
  border-radius: 8px;
  margin-top: 10px;
}

.timer-display span {
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

/* Make sure visit link items are clickable */
.visit-link-item {
  display: flex;
  align-items: center;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  margin: 10px 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.visit-link-item:hover {
  border-color: #667eea;
  background: #f8f9ff;
  transform: translateY(-2px);
}

.visit-link-item:active {
  transform: translateY(0px);
}

.visit-link-item i {
  font-size: 24px;
  color: #667eea;
  margin-right: 15px;
  width: 30px;
}

.link-info {
  flex: 1;
}

.link-info h4 {
  margin: 0 0 5px 0;
  color: #333;
}

.link-info p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.reward-badge {
  background: #28a745;
  color: white;
  padding: 5px 12px;
  border-radius: 15px;
  font-weight: bold;
  font-size: 14px;
}

.visit-instructions {
  text-align: left;
}

.instructions-list p {
  margin: 10px 0;
  padding-left: 10px;
}

.visit-status, .shortener-status {
  padding: 20px;
  text-align: center;
  font-size: 16px;
  line-height: 1.6;
}

/* Video Player Modal Styles */
.video-player-modal {
    z-index: 2000;
}

.video-player-content {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.video-header h3 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.video-close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.video-close:hover {
    color: #000;
}

.video-container {
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

#videoPlayer {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 70vh;
}

.video-error {
    text-align: center;
    color: white;
    padding: 40px 20px;
}

.video-error i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ffc107;
}

.video-controls {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.control-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    background: #007bff;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.control-btn:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.play-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.play-btn:hover {
    background: #218838;
}

.download-btn {
    background: #007bff;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .video-player-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .play-btn, .download-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Additional CSS for error handling */
.error-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.video-error ul {
    background: rgba(255,255,255,0.1);
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

.video-error li {
    margin: 5px 0;
    color: #ffc107;
}

@media (max-width: 768px) {
    .error-actions {
        flex-direction: column;
    }
    
    .error-actions .download-btn {
        width: 100%;
        justify-content: center;
    }
}

.earn-btn{
      background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    margin-top: 15px;
}

#buyCodeBtn{
  position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #ff5722;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 9999;
    transition: background-color 0.3s;
    text-decoration: none;
}