/* Croatian Creativity Test - Custom Styles */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Root Variables */
:root {
  --primary-color: #4f46e5;
  --primary-dark: #3730a3;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --info-color: #06b6d4;
  --danger-color: #ef4444;
  --light-color: #f8fafc;
  --dark-color: #1e293b;
  --text-color: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Base Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #ffffff;
}

.min-vh-75 {
  min-height: 75vh;
}

/* Custom Background Gradients */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

/* Typography */
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-weight: 700;
  line-height: 1.2;
}

.lead {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
}

/* Navigation */
.navbar {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95) !important;
  transition: all 0.3s ease;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-nav .nav-link {
  font-weight: 500;
  padding: 0.75rem 1rem !important;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  color: var(--text-color) !important;
}

.navbar-nav .nav-link:hover {
  background-color: var(--light-color);
  color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" patternUnits="userSpaceOnUse" width="100" height="100"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="25" r="0.5" fill="white" opacity="0.05"/><circle cx="25" cy="75" r="0.5" fill="white" opacity="0.05"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-illustration svg {
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.1));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* Cards */
.card {
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.feature-card, .benefit-card {
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.feature-card:hover, .benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-icon, .stat-item {
  transition: all 0.3s ease;
}

.feature-icon:hover {
  transform: scale(1.1);
}

/* Buttons */
.btn {
  border-radius: 0.75rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: none;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Forms */
.form-control {
  border-radius: 0.75rem;
  border: 2px solid var(--border-color);
  padding: 0.875rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.1);
  transform: translateY(-1px);
}

.form-control-lg {
  padding: 1rem 1.25rem;
  font-size: 1.125rem;
}

/* Progress Bar */
.progress {
  border-radius: 1rem;
  overflow: hidden;
  background-color: var(--light-color);
}

.progress-bar {
  border-radius: 1rem;
  transition: all 0.8s ease;
}

/* Word Input Animation */
.word-input {
  position: relative;
}

.word-input:focus + .form-label {
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* Test Interface */
.test-progress {
  background: var(--light-color);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.word-item {
  transition: all 0.3s ease;
  border: 2px solid var(--border-color) !important;
}

.word-item:hover {
  border-color: var(--primary-color) !important;
  transform: translateX(5px);
}

/* Accordion */
.accordion-item {
  border-radius: 1rem !important;
  overflow: hidden;
}

.accordion-button {
  font-weight: 600;
  padding: 1.25rem 1.5rem;
  background: white;
  border: none;
  border-radius: 1rem !important;
}

.accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.1);
}

.accordion-button::after {
  transition: transform 0.3s ease;
}

.accordion-body {
  padding: 1.5rem;
  background: var(--light-color);
}

/* Stats Section */
.stats-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.stat-number {
  font-weight: 800;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Animations */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-in {
  animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--dark-color) 0%, #0f172a 100%);
  color: white !important;
}

footer * {
  color: white !important;
}

footer a {
  transition: all 0.3s ease;
  color: white !important;
}

footer a:hover {
  color: var(--primary-color) !important;
  transform: translateX(5px);
}

footer .text-muted {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 0;
  }
  
  .display-4 {
    font-size: 2rem;
  }
  
  .hero-illustration svg {
    width: 300px;
    height: 225px;
  }
  
  .btn-group {
    flex-direction: column;
    gap: 0.5rem !important;
  }
  
  .btn-group .btn {
    width: 100%;
  }
  
  .feature-card, .benefit-card {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 576px) {
  .display-4 {
    font-size: 1.75rem;
  }
  
  .lead {
    font-size: 1rem;
  }
  
  .btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  .hero-illustration {
    margin-top: 2rem;
  }
  
  .hero-illustration svg {
    width: 250px;
    height: 187px;
  }
}

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Custom Utilities */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.border-gradient {
  border: 2px solid;
  border-image: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) 1;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1100;
}

.toast {
  border-radius: 1rem;
  border: none;
  box-shadow: var(--shadow-lg);
}

/* Scroll Behavior */
html {
  scroll-behavior: smooth;
}

/* Focus States */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.btn:focus, .form-control:focus {
  outline: none;
}

/* Print Styles */
@media print {
  .navbar, footer, .btn, .test-interface {
    display: none !important;
  }
  
  .hero-section {
    background: white !important;
    color: black !important;
  }
}
