/* Variables */
:root {
  --primary: #4a6bdf;
  --primary-dark: #3a56b2;
  --text: #2d3748;
  --text-light: #718096;
  --bg: #f7fafc;
  --white: #ffffff;
  --error: #e53e3e;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius: 0.5rem;
  --transition: all 0.2s ease-in-out;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary);
  font-size: 2.5rem;
}

/* Form Elements */
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 107, 223, 0.2);
}

button {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  margin-bottom: 2rem;
}

button:hover {
  background-color: var(--primary-dark);
}

button:disabled {
  background-color: #cbd5e0;
  cursor: not-allowed;
}

/* Loading State */
.loading {
  text-align: center;
  padding: 1rem;
  font-style: italic;
  color: var(--text-light);
}

.hidden {
  display: none;
}

/* Error Message */
.error-message {
  background-color: #fff5f5;
  color: var(--error);
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--error);
}

/* Results */
#results {
  margin-top: 2rem;
}

.fusion-card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-top: 1.5rem;
}

.fusion-title {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.fusion-comment {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.celeb-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.celeb-details {
  text-align: center;
  flex: 1;
  min-width: 150px;
}

.celeb-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  margin-bottom: 0.5rem;
  background-color: #f0f4f8;
}

.celeb-name {
  font-weight: 600;
  color: var(--text);
}

.fusion-separator {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary);
  align-self: center;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .celeb-info {
    flex-direction: column;
    gap: 1rem;
  }
  
  .fusion-separator {
    transform: rotate(90deg);
  }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1c;
    --primary: #5a7bff;
    --primary-dark: #3a5bff;
    --text: #f5f5f7;
    --text-light: #a1a1a6;
  }
  
  body {
    background-color: var(--bg);
    color: var(--text);
  }
  
  input[type="text"] {
    background-color: #2c2c2e;
    color: #f5f5f7;
    border-color: #3a3a3c;
  }
  
  .fusion-card {
    background-color: #2c2c2e;
    border: 1px solid #3a3a3c;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .celeb-info {
    flex-direction: column;
    gap: 2rem;
  }
  
  .fusion-separator {
    transform: rotate(90deg);
    margin: 1rem 0;
  }
  
  .celeb-details {
    min-width: 100%;
  }
}
