/* CSS Variables for theming */
:root {
  --bg-primary: #121212;
  --bg-secondary: rgba(255, 255, 255, 0.05);
  --bg-accent: rgba(255, 255, 255, 0.1);
  --text-primary: #ddd;
  --text-secondary: #999;
  --text-accent: #bbb;
  --accent-color: #4caf50;
  --accent-hover: #3d8b40;
  --error-color: #f44336;
  --border-radius: 12px;
  --transition: all 0.3s ease;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --gradient: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Roboto Slab', serif;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Particle background */
#particle-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: 
    radial-gradient(circle at 20% 80%, rgba(76, 175, 80, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(76, 175, 80, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(76, 175, 80, 0.02) 0%, transparent 50%);
}

/* Main content layout */
.main-content {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 1;
}

/* Hero section */
.hero-section {
  margin-bottom: 2rem;
  max-width: 900px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-accent);
}

.title-line {
  display: block;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--accent-color);
  font-weight: 600;
  text-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
  animation: pulse 2s infinite;
}

/* Countdown section */
.countdown-section {
  margin-bottom: 2rem;
}

.countdown-timer {
  font-family: 'Roboto Slab', serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 1.5rem 2.5rem;
  border-radius: var(--border-radius);
  user-select: none;
  min-width: 280px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.countdown-timer:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

/* Upload section */
.upload-section {
  width: 100%;
  max-width: 500px;
  margin-bottom: 2rem;
}

.upload-message {
  margin-bottom: 1.5rem;
  font-weight: 600;
  min-height: 24px;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.upload-message.success {
  background: rgba(76, 175, 80, 0.1);
  color: var(--accent-color);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.upload-message.error {
  background: rgba(244, 67, 54, 0.1);
  color: var(--error-color);
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.upload-form {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.upload-form:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.upload-label {
  display: block;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 1.5;
}

/* Custom file input */
.file-input-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.file-input-custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(34, 34, 34, 0.8);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  color: var(--text-secondary);
  transition: var(--transition);
  min-height: 60px;
}

.file-input-wrapper:hover .file-input-custom {
  border-color: var(--accent-color);
  background: rgba(34, 34, 34, 0.9);
}

.file-input-text {
  font-size: 1rem;
}

.file-input-icon {
  font-size: 1.5rem;
}

/* Submit button */
.submit-button {
  position: relative;
  margin-top: 1.5rem;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--bg-primary);
  background-color: var(--text-accent);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  overflow: hidden;
}

.submit-button:hover:not(:disabled) {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.submit-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.button-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid var(--bg-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.submit-button.loading .button-text {
  opacity: 0;
}

.submit-button.loading .button-loader {
  display: block;
}

/* Progress bar */
.progress-container {
  margin-top: 1.5rem;
  display: none;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-color), #8bc34a);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Gallery button */
.gallery-section {
  margin-top: 1rem;
}

.gallery-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--accent-color);
  color: var(--bg-primary);
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.gallery-button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.button-icon {
  font-size: 1.2rem;
}

/* Nostalgic floating elements */
.nostalgic-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.floating-item {
  position: absolute;
  font-size: 2rem;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.item-1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.item-2 {
  top: 60%;
  left: 85%;
  animation-delay: 1.5s;
}

.item-3 {
  top: 80%;
  left: 15%;
  animation-delay: 3s;
}

.item-4 {
  top: 30%;
  left: 90%;
  animation-delay: 4.5s;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* Page load animation */
body {
  opacity: 0;
  animation: fadeIn 1.2s ease forwards;
}

/* Responsive design */
@media (max-width: 768px) {
  .main-content {
    padding: 1.5rem 1rem;
  }
  
  .upload-form {
    padding: 1.5rem;
  }
  
  .countdown-timer {
    padding: 1rem 1.5rem;
    min-width: 250px;
  }
  
  .floating-item {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .countdown-timer {
    font-size: 1.3rem;
    padding: 0.8rem 1.2rem;
    min-width: 220px;
  }
  
  .upload-form {
    padding: 1.2rem;
  }
  
  .file-input-custom {
    padding: 0.8rem 1.2rem;
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}