/* WinRAR.lol - Advanced CSS with Cool Effects */

:root {
  --primary-color: #8b5cf6;
  --secondary-color: #a855f7;
  --accent-color: #c084fc;
  --background-dark: #0a0a0a;
  --background-darker: #050505;
  --surface-color: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #888888;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --border-color: #333333;
  --shadow-color: rgba(139, 92, 246, 0.3);
  --gradient-primary: linear-gradient(135deg, #8b5cf6, #a855f7);
  --gradient-secondary: linear-gradient(135deg, #c084fc, #8b5cf6);
  --gradient-background: linear-gradient(135deg, #0a0a0a, #1a1a1a, #0a0a0a);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Rajdhani', 'Segoe UI', Tahoma, sans-serif;
  background: var(--gradient-background);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Animated Background */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-color);
  border-radius: 50%;
  animation: float 6s infinite ease-in-out;
  opacity: 0.6;
  box-shadow: 0 0 10px var(--accent-color);
}

.particle:nth-child(1) {
  top: 20%;
  left: 20%;
  animation-delay: 0s;
  animation-duration: 8s;
}

.particle:nth-child(2) {
  top: 40%;
  left: 80%;
  animation-delay: 2s;
  animation-duration: 6s;
}

.particle:nth-child(3) {
  top: 60%;
  left: 40%;
  animation-delay: 4s;
  animation-duration: 7s;
}

.particle:nth-child(4) {
  top: 80%;
  left: 10%;
  animation-delay: 1s;
  animation-duration: 9s;
}

.particle:nth-child(5) {
  top: 30%;
  left: 70%;
  animation-delay: 3s;
  animation-duration: 5s;
}

.particle:nth-child(6) {
  top: 70%;
  left: 90%;
  animation-delay: 5s;
  animation-duration: 8s;
}

.particle:nth-child(7) {
  top: 10%;
  left: 50%;
  animation-delay: 2.5s;
  animation-duration: 6.5s;
}

.particle:nth-child(8) {
  top: 90%;
  left: 30%;
  animation-delay: 4.5s;
  animation-duration: 7.5s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-20px) translateX(10px);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-10px) translateX(-10px);
    opacity: 1;
  }
  75% {
    transform: translateY(-30px) translateX(5px);
    opacity: 0.7;
  }
}

/* Glitch Effect */
.glitch-container {
  text-align: center;
  margin: 40px 0;
  position: relative;
}

.glitch {
  font-family: 'Orbitron', monospace;
  font-size: 4rem;
  font-weight: 900;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  display: inline-block;
  animation: smoothGlow 3s ease-in-out infinite;
  text-shadow: 0 0 20px var(--primary-color);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch::before {
  animation: smoothGlow-1 4s ease-in-out infinite;
  color: var(--accent-color);
  z-index: -1;
  text-shadow: 0 0 15px var(--accent-color);
}

.glitch::after {
  animation: smoothGlow-2 5s ease-in-out infinite;
  color: var(--secondary-color);
  z-index: -2;
  text-shadow: 0 0 15px var(--secondary-color);
}

@keyframes smoothGlow {
  0%, 100% {
    transform: scale(1);
    text-shadow: 0 0 20px var(--primary-color);
  }
  50% {
    transform: scale(1.02);
    text-shadow: 0 0 30px var(--primary-color), 0 0 40px var(--primary-color);
  }
}

@keyframes smoothGlow-1 {
  0%, 100% {
    transform: translate(0, 0);
    opacity: 0;
  }
  25% {
    transform: translate(-1px, 1px);
    opacity: 0.3;
  }
  50% {
    transform: translate(0, 0);
    opacity: 0.6;
  }
  75% {
    transform: translate(1px, -1px);
    opacity: 0.3;
  }
}

@keyframes smoothGlow-2 {
  0%, 100% {
    transform: translate(0, 0);
    opacity: 0;
  }
  30% {
    transform: translate(1px, -1px);
    opacity: 0.2;
  }
  60% {
    transform: translate(0, 0);
    opacity: 0.4;
  }
  90% {
    transform: translate(-1px, 1px);
    opacity: 0.2;
  }
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-top: 10px;
  font-weight: 300;
  letter-spacing: 0.05em;
}

/* Main Upload Container */
.upload-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
}

.upload-info {
  text-align: center;
  margin-bottom: 30px;
}

.file-types {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.file-type {
  background: var(--gradient-primary);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
  text-align: center;
}

.file-type:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-color);
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.upload-limit {
  color: var(--text-muted);
  font-size: 1rem;
}

.highlight {
  color: var(--accent-color);
  font-weight: 600;
}

/* Enhanced Dropzone */
.dropzone {
  border: 3px dashed var(--border-color);
  border-radius: 20px;
  padding: 60px 40px;
  cursor: pointer;
  margin: 30px auto;
  background: var(--surface-color);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dropzone::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
  transition: left 0.5s;
}

.dropzone:hover::before {
  left: 100%;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--primary-color);
  background: rgba(139, 92, 246, 0.05);
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(139, 92, 246, 0.2);
}

.dropzone-content {
  position: relative;
  z-index: 2;
}

.upload-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  color: var(--primary-color);
  animation: bounce 2s infinite;
}

.upload-icon svg {
  width: 100%;
  height: 100%;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.dropzone-text {
  text-align: center;
}

.primary-text {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.secondary-text {
  display: block;
  font-size: 1rem;
  color: var(--text-secondary);
}

.dropzone-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pulse-ring 2s infinite;
  opacity: 0;
}

.dropzone:hover .dropzone-pulse {
  opacity: 0.6;
}

@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* Progress Bar */
.progress-container {
  display: none;
  margin: 20px 0;
}

.progress-bar {
  position: relative;
  width: 100%;
  height: 20px;
  background: var(--surface-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 10px;
  width: 0%;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Result Container */
.result-container {
  margin: 30px 0;
  min-height: 60px;
}

.result-content {
  background: var(--surface-color);
  border-radius: 15px;
  padding: 20px;
  border-left: 4px solid var(--success-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-content.error {
  border-left-color: var(--error-color);
}

.result-content a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.result-content a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.stat {
  text-align: center;
  background: var(--surface-color);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.stat:hover {
  transform: translateY(-5px);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  font-family: 'Orbitron', monospace;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Floating Action Buttons */
.floating-actions {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 1000;
}

.fab {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-primary);
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px var(--shadow-color);
}

.fab svg {
  width: 24px;
  height: 24px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--surface-color);
  border-radius: 20px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

.modal-header h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--primary-color);
}

.modal-body ul {
  list-style: none;
  padding: 0;
}

.modal-body li {
  padding: 8px 0;
  color: var(--text-secondary);
}

/* Toast Notification */
.toast {
  position: fixed;
  top: 30px;
  right: 30px;
  background: var(--surface-color);
  border-radius: 10px;
  padding: 15px 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 3000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  border-left: 4px solid var(--success-color);
}

.toast.show {
  transform: translateX(0);
}

.toast.error {
  border-left-color: var(--error-color);
}

.toast.warning {
  border-left-color: var(--warning-color);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--success-color);
}

.toast.error .toast-icon {
  background: var(--error-color);
}

.toast.warning .toast-icon {
  background: var(--warning-color);
}

.toast-message {
  color: var(--text-primary);
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .glitch {
    font-size: 2.5rem;
  }
  
  .dropzone {
    padding: 40px 20px;
  }
  
  .upload-icon {
    width: 60px;
    height: 60px;
  }
  
  .primary-text {
    font-size: 1.2rem;
  }
  
  .file-types {
    gap: 10px;
  }
  
  .file-type {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .floating-actions {
    bottom: 20px;
    right: 20px;
  }
  
  .fab {
    width: 50px;
    height: 50px;
  }
  
  .fab svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .upload-container {
    padding: 10px;
  }
  
  .glitch {
    font-size: 2rem;
  }
  
  .dropzone {
    padding: 30px 15px;
  }
  
  .stats {
    grid-template-columns: 1fr;
  }
}

/* Footer Credit */
.footer-credit {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 300;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  z-index: 100;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 16px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.footer-credit:hover {
  opacity: 1;
  color: var(--accent-color);
}

/* Discord Embed Modal */
.embed-preview {
  background: #2f3136;
  border-left: 4px solid var(--primary-color);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.embed-content {
  color: #dcddde;
}

.embed-title {
  color: #ffffff;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
}

.embed-description {
  color: #dcddde;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.embed-footer {
  color: #72767d;
  font-size: 12px;
  margin-top: 8px;
}

.embed-controls {
  margin-bottom: 20px;
}

.control-group {
  margin-bottom: 15px;
}

.control-group label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 5px;
  font-weight: 500;
}

.control-group input,
.control-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: var(--surface-color);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color 0.3s ease;
}

.control-group input:focus,
.control-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.control-group input[type="color"] {
  width: 60px;
  height: 40px;
  padding: 0;
  cursor: pointer;
}

.embed-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.embed-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.embed-btn.primary {
  background: var(--gradient-primary);
  color: white;
}

.embed-btn.secondary {
  background: var(--surface-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.embed-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--shadow-color);
}

/* Custom Media Player */
.player-modal {
  max-width: 800px;
  width: 95%;
}

.media-player {
  background: var(--surface-color);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.player-container {
  position: relative;
  background: #000;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#mediaPlayer,
#audioPlayer {
  width: 100%;
  height: auto;
  max-height: 500px;
  background: #000;
}

.player-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 10;
  display: none;
}

.player-info.show {
  display: block;
}

.file-icon-large {
  font-size: 4rem;
  margin-bottom: 15px;
  opacity: 0.8;
}

.file-details h4 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: white;
}

.file-details p {
  color: #ccc;
  margin: 5px 0;
  font-size: 0.9rem;
}

.player-controls {
  padding: 20px;
  background: var(--surface-color);
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.download-btn,
.share-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.download-btn {
  background: var(--gradient-primary);
  color: white;
}

.share-btn {
  background: var(--gradient-secondary);
  color: white;
}

.download-btn:hover,
.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-color);
}

.download-btn svg,
.share-btn svg {
  width: 18px;
  height: 18px;
}

/* Custom Video Controls */
#mediaPlayer::-webkit-media-controls {
  background: rgba(0, 0, 0, 0.8);
}

#mediaPlayer::-webkit-media-controls-panel {
  background: rgba(0, 0, 0, 0.8);
}

/* Custom Audio Controls */
#audioPlayer {
  width: 100%;
  height: 60px;
  background: var(--surface-color);
  border-radius: 8px;
}

#audioPlayer::-webkit-media-controls-panel {
  background: var(--surface-color);
}

/* Loading Animation */
.player-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.2rem;
}

.player-loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .player-modal {
    width: 98%;
    margin: 10px;
  }
  
  .player-container {
    min-height: 200px;
  }
  
  .file-icon-large {
    font-size: 3rem;
  }
  
  .file-details h4 {
    font-size: 1.2rem;
  }
  
  .player-controls {
    padding: 15px;
    flex-direction: column;
    align-items: center;
  }
  
  .download-btn,
  .share-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Dark Theme Override */
.dark-theme {
  --background-dark: #000000;
  --background-darker: #111111;
  --surface-color: #222222;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --primary-color: #7c3aed;
  --secondary-color: #9333ea;
  --accent-color: #a855f7;
  --gradient-primary: linear-gradient(135deg, #7c3aed, #9333ea);
  --gradient-secondary: linear-gradient(135deg, #a855f7, #7c3aed);
}
