:root {
  --bg-body: #f7f9fc;
  --bg-card: #ffffff;
  --text-main: #2c3e50;
  --text-muted: #95a5a6;
  --primary: #222;
  --primary-hover: #000;
  --accent: #3498db;
  --border: #edf2f7;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
  --radius: 24px;
  --font-body: "Poppins", sans-serif;
  --font-brand: "Dancing Script", cursive;
}

body.dark-mode {
  --bg-body: #121212;
  --bg-card: #1e1e1e;
  --text-main: #ecf0f1;
  --text-muted: #bdc3c7;
  --primary: #f5f5f5;
  --primary-hover: #ffffff;
  --accent: #5dade2;
  --border: #333;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s, color 0.3s;
}

/* Background Blob */
.gradient-blob {
  position: fixed;
  top: -10%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  filter: blur(80px);
  opacity: 0.15;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}

/* Header */
.main-header {
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-brand img {
  height: 40px;
}
.header-brand .brand-name {
  font-family: var(--font-brand);
  font-size: 1.8rem;
  font-weight: 700;
}

/* Navigation */
.main-nav ul {
  display: flex;
  background: var(--bg-card);
  padding: 6px;
  border-radius: 50px;
  box-shadow: var(--shadow);
  gap: 5px;
  list-style: none;
}
.main-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all 0.3s ease;
  text-decoration: none;
}
.main-nav a:hover {
  color: var(--text-main);
  background: var(--bg-body);
}
.main-nav a.active {
  background: var(--primary);
  color: var(--bg-card);
  shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.icon-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-main);
  cursor: pointer;
  padding: 10px;
}
.sun-icon {
  display: block;
}
.moon-icon {
  display: none;
}
body.dark-mode .sun-icon {
  display: none;
}
body.dark-mode .moon-icon {
  display: block;
}

/* Main Layout */
main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.view-section {
  display: none;
  animation: fadeIn 0.4s ease;
}
.view-section.active {
  display: block;
}
.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.grid-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Cards & UI Elements */
.card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

h2,
h3 {
  font-weight: 600;
  margin-bottom: 1rem;
}
h3 {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Form Elements */
.radio-group,
.check-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 1.5rem;
}
.radio-item,
.check-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px;
  border-radius: 12px;
  transition: 0.2s;
}
.radio-item:hover,
.check-item:hover {
  background: var(--bg-body);
}
.radio-item input,
.check-item input {
  display: none;
}

.radio-mark,
.check-mark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  margin-right: 12px;
  position: relative;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.check-mark {
  border-radius: 6px;
}
.check-mark i {
  font-size: 0.7rem;
  color: var(--bg-card);
  transform: scale(0);
  transition: 0.2s;
}
.radio-mark::after {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  position: absolute;
  transform: scale(0);
  transition: 0.2s;
}

input:checked + .radio-mark {
  border-color: var(--primary);
}
input:checked + .radio-mark::after {
  transform: scale(1);
}
input:checked + .check-mark {
  background: var(--primary);
  border-color: var(--primary);
}
input:checked + .check-mark i {
  transform: scale(1);
}

.label-text {
  font-weight: 500;
  font-size: 0.95rem;
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: var(--bg-card);
  border: none;
  border-radius: 16px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
}
.btn-text:hover {
  color: var(--text-main);
}

/* Upload Zone */
.upload-zone {
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
}
.upload-zone:hover {
  border-color: var(--primary);
  background: var(--bg-body);
}
.upload-content {
  text-align: center;
}
.icon-circle {
  width: 80px;
  height: 80px;
  background: var(--bg-body);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--text-main);
  font-size: 2rem;
}
.file-info {
  margin-top: 1rem;
  padding: 1rem;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 12px;
  text-align: center;
  font-weight: 500;
  border: 1px solid #c8e6c9;
}

/* Results Grid */
.results-container {
  margin-top: 3rem;
}
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.result-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.result-question {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  min-height: 3rem;
}
.result-stats {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
}
.big-score {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}
.mini-chart {
  width: 60px;
  height: 60px;
  position: relative;
}
.progress-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 5px solid var(--border);
}
.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 5px solid transparent;
  border-top-color: currentColor;
  transform: rotate(var(--deg));
}

/* PROFILE SECTION - RESPONSIVE & MINIMALIST */
.profile-card {
  background: var(--bg-card);
  border-radius: 30px;
  padding: 3rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  max-width: 800px;
  margin: 2rem auto;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.profile-avatar {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, #222, #444);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 4rem;
  animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
  0% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
  50% {
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
  }
  100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
}

.profile-info h2 {
  font-size: 2rem;
  margin-bottom: 0.2rem;
}
.profile-info .role {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}
.profile-info .bio {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.profile-socials {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.social-link {
  padding: 10px 20px;
  background: var(--bg-body);
  color: var(--text-main);
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: 0.2s;
  border: 1px solid transparent;
}
.social-link:hover {
  background: var(--primary);
  color: var(--bg-card);
  transform: translateY(-2px);
}

/* Footer */
.main-footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: auto;
}
.main-footer a {
  color: var(--text-main);
  font-weight: 600;
  text-decoration: none;
}

/* MEDIA QUERIES */
@media (max-width: 900px) {
  .grid-layout {
    grid-template-columns: 1fr;
  }
  .col-controls {
    order: 2;
  }
  .upload-zone {
    min-height: 250px;
  }
}

@media (max-width: 768px) {
  .main-header {
    padding: 1rem;
  }
  .brand-name {
    display: none;
  }

  /* RESPONSIVE PROFILE: COLUMNA EN MÓVIL */
  .profile-card {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
    gap: 1.5rem;
  }
  .profile-socials {
    justify-content: center;
  }
  .profile-avatar {
    width: 120px;
    height: 120px;
    font-size: 3rem;
  }
}
