/*
Theme Name: OSJ Challenges
Theme URI: https://osjchallenges.com
Author: OSJ Team
Author URI: https://osjchallenges.com
Description: A modern music-themed WordPress theme for OSJ Challenges platform
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: music, challenges, modern, gradient, responsive
Text Domain: osj-challenges
*/

:root {
  --music-purple: #8b5cf6;
  --music-pink: #ec4899;
  --music-blue: #3b82f6;
  --music-gold: #fbbf24;
  --dark-bg: #0f0f23;
  --card-bg: #1a1a2e;
}

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
}

/* Animated gradient background */
@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animate-gradient {
  background: linear-gradient(-45deg, #581c87, #1e3a8a, #831843);
  background-size: 200% 200%;
  animation: gradient 15s ease infinite;
  min-height: 100vh;
}

/* Music note animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* Pulse animation */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.8);
  }
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Header */
.site-header {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.5rem 0;
  position: relative;
  z-index: 100000;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-glow 2s ease-in-out infinite;
}

.site-title {
  font-size: 2rem;
  font-weight: 800;
  color: white;
  margin: 0;
  letter-spacing: -0.02em;
}

.site-description {
  color: #c4b5fd;
  font-size: 0.875rem;
  margin: 0;
}

.main-navigation ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.3s;
}

.main-navigation a:hover {
  color: white;
}

/* Tools dropdown */
.tools-menu {
  position: relative;
}

.tools-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.tools-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.tools-dropdown {
  display: none !important;
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.5rem;
  min-width: 220px;
  padding: 0.5rem 0;
  backdrop-filter: blur(8px);
  z-index: 100001;
  margin-top: 0.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.tools-dropdown li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tools-dropdown li a {
  display: block;
  padding: 0.75rem 1rem;
  color: white;
  text-decoration: none;
  transition: background 0.2s;
}

.tools-dropdown li a:hover {
  background: rgba(255, 255, 255, 0.15);
}

.tools-menu.open .tools-dropdown {
  display: block !important;
}

/* Fallback: allow hover/focus to open tools menu */
.tools-menu:hover .tools-dropdown,
.tools-menu:focus-within .tools-dropdown {
  display: block !important;
}

/* Clean tools pages (frontend admin tools) */
.page-template-page-tools-create-challenge .animate-gradient,
.page-template-page-tools-edit-challenges .animate-gradient,
.page-template-page-tools-add-collection .animate-gradient {
  background: #f8fafc;
  animation: none;
}

.page-template-page-tools-create-challenge .site-main,
.page-template-page-tools-edit-challenges .site-main,
.page-template-page-tools-add-collection .site-main {
  color: #0f172a;
}

.page-template-page-tools-create-challenge .wrap,
.page-template-page-tools-edit-challenges .wrap,
.page-template-page-tools-add-collection .wrap {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
}

.page-template-page-tools-create-challenge .form-table th,
.page-template-page-tools-edit-challenges .form-table th,
.page-template-page-tools-add-collection .form-table th,
.page-template-page-tools-create-challenge .form-table td,
.page-template-page-tools-edit-challenges .form-table td,
.page-template-page-tools-add-collection .form-table td {
  color: #0f172a;
}

.page-template-page-tools-create-challenge .description,
.page-template-page-tools-edit-challenges .description,
.page-template-page-tools-add-collection .description {
  color: #475569;
}

.page-template-page-tools-create-challenge input[type="text"],
.page-template-page-tools-create-challenge input[type="url"],
.page-template-page-tools-create-challenge input[type="datetime-local"],
.page-template-page-tools-create-challenge textarea,
.page-template-page-tools-add-collection input[type="text"],
.page-template-page-tools-add-collection input[type="url"],
.page-template-page-tools-add-collection textarea,
.page-template-page-tools-add-collection select {
  background: #ffffff;
  border: 1px solid #cbd5f5;
  color: #0f172a;
}

.page-template-page-tools-edit-challenges .wp-list-table,
.page-template-page-tools-edit-challenges .wp-list-table th,
.page-template-page-tools-edit-challenges .wp-list-table td {
  background: #ffffff;
  color: #0f172a;
}

.page-template-page-tools-edit-challenges .wp-list-table thead th {
  background: #f1f5f9;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 4rem 1rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1.5rem;
  animation: float 3s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.8), 0 0 20px rgba(251, 191, 36, 0.6), 0 0 30px rgba(251, 191, 36, 0.4), 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-description {
  font-size: 1.25rem;
  color: #e9d5ff;
  max-width: 42rem;
  margin: 0 auto;
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 4rem 0;
}

.feature-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s;
}

.feature-card:hover {
  transform: scale(1.05);
  border-color: #a855f7;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.75rem;
}

.feature-description {
  color: #e9d5ff;
}

/* CTA Button */
.cta-section {
  text-align: center;
  margin: 3rem 0;
}

.cta-button {
  background: linear-gradient(to right, #a855f7, #ec4899);
  color: white;
  font-weight: 700;
  padding: 1rem 2.5rem;
  border-radius: 9999px;
  border: none;
  font-size: 1.125rem;
  cursor: pointer;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
}

.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 50px rgba(139, 92, 246, 0.5);
}

/* Stats Section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin: 5rem 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-number.yellow { color: #fbbf24; }
.stat-number.pink { color: #ec4899; }
.stat-number.blue { color: #3b82f6; }
.stat-number.green { color: #10b981; }

.stat-label {
  color: #e9d5ff;
}

/* Footer */
.site-footer {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 5rem;
  padding: 2rem 0;
  text-align: center;
  color: #e9d5ff;
}

/* Mobile Menu Button */
.mobile-menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1.5rem;
  transition: background 0.3s;
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.main-navigation.mobile-open {
  display: block !important;
}

/* Responsive */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .header-content {
    flex-wrap: wrap;
  }
  
  .main-navigation {
    display: none;
    width: 100%;
    margin-top: 1rem;
  }
  
  .main-navigation ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .tools-dropdown {
    position: static;
    top: auto;
    right: auto;
    width: 100%;
    margin-top: 0.5rem;
  }
  
  .main-navigation li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .main-navigation a {
    display: block;
    padding: 1rem;
    text-align: center;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 1.5rem;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
