/* --- PROFESSIONAL MODERN STYLE WITH DARK MODE --- */
:root {
  /* Light Theme (Default) */
  --primary-color: #4a90e2;
  --secondary-color: #50e3c2;
  --accent-color: #ff6b6b;
  --text-dark: #2d3436;
  --text-light: #636e72;
  --white: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(255, 255, 255, 0.4);
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.1);
  --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --font-main: "Poppins", sans-serif;

  /* Additional Light Theme Variables */
  --bg-primary: #f0f4f8;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f8f9fa;
  --border-color: #dfe6e9;
  --card-bg: #ffffff;
  --input-bg: #fdfdfd;
  --option-bg: #ffffff;
  --option-hover-bg: #f0f7ff;
  --nav-box-bg: #ffffff;
  --body-gradient: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
}

/* Dark Theme */
body.dark-mode {
  --primary-color: #5ba3ff;
  --secondary-color: #4ecdc4;
  --accent-color: #ff8787;
  --text-dark: #e4e6eb;
  --text-light: #b0b3b8;
  --white: #1e1e1e;
  --glass-bg: rgba(30, 30, 30, 0.95);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.5);

  /* Dark Theme Specific Variables */
  --bg-primary: #0a0a0a;
  --bg-secondary: #1e1e1e;
  --bg-tertiary: #2a2a2a;
  --border-color: #3a3a3a;
  --card-bg: #242424;
  --input-bg: #2a2a2a;
  --option-bg: #2a2a2a;
  --option-hover-bg: #1a3a52;
  --nav-box-bg: #2a2a2a;
  --body-gradient: linear-gradient(-45deg, #1a1a2e, #16213e, #0f3460, #533483);
}

body {
  font-family: var(--font-main);
  background: #f0f4f8; /* Fallback */
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: var(--text-dark);
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  line-height: 1.6;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Container Styles */
.container-view {
  max-width: 1000px; /* Slightly wider default */
  width: 95%;
  margin: 30px auto;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  padding: 40px;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  text-align: center;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.container-view.hidden {
  display: none !important;
}

/* Text Styles */
h1,
h2,
h3,
h4 {
  color: var(--text-dark);
  margin-bottom: 20px;
  font-weight: 700;
}
h1 {
  font-size: 2.5em;
  letter-spacing: -1px;
}
h2 {
  font-size: 2em;
}
h3 {
  font-size: 1.5em;
  font-weight: 600;
  color: var(--text-light);
}

/* License / Login Form Specifics */
#license-form-container {
  max-width: 600px;
  background: white;
  padding: 50px 40px;
}

#license-form-container .logo-area {
  margin-bottom: 20px;
  animation: floatIcon 3s ease-in-out infinite;
}
@keyframes floatIcon {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

.app-title-highlight {
  background: linear-gradient(to right, #667eea, #764ba2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.app-features {
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.app-features li {
  margin-bottom: 12px;
  font-size: 1rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
}
.app-features li i {
  color: var(--secondary-color);
  margin-right: 12px;
  font-size: 1.1em;
}

/* Inputs */
.input-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
  width: 100%;
}
.input-group {
  position: relative;
  width: 100%;
}
.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #b2bec3;
  pointer-events: none;
}
input[type="text"] {
  width: 100%;
  padding: 14px 14px 14px 45px;
  border: 2px solid #dfe6e9;
  border-radius: 12px;
  font-size: 1rem;
  font-family: var(--font-main);
  transition: all 0.3s ease;
  box-sizing: border-box;
  background: #fdfdfd;
}
input[type="text"]:focus,
select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
  outline: none;
  background: white;
}

select {
  width: 100%;
  padding: 14px 14px 14px 45px;
  border: 2px solid #dfe6e9;
  border-radius: 12px;
  font-size: 1rem;
  font-family: var(--font-main);
  transition: all 0.3s ease;
  box-sizing: border-box;
  background: #fdfdfd;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color: #2d3436;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23b2bec3%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 15px top 50%;
  background-size: 12px auto;
}

/* Buttons */
button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: var(--font-main);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  display: inline-inline;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.6);
}
button:active {
  transform: translateY(0);
}

/* Specific Buttons */
#submit-license-button {
  width: 100%;
  font-size: 1.1rem;
  margin-top: 10px;
}
#reset-session-button {
  background: #ffeaa7;
  color: #d63031;
  box-shadow: none;
  font-size: 0.9rem;
  margin-top: 10px;
}
#reset-session-button:hover {
  background: #fdcb6e;
}

/* ========================================
   WELCOME PAGE ELEMENTS - DESKTOP STYLES
   ======================================== */

/* Logo Circle */
.logo-circle {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.logo-circle i {
  font-size: 3rem;
  color: white;
}

/* Welcome Header */
.welcome-header {
  margin-bottom: 30px;
}

.welcome-header h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  line-height: 1.3;
}

.welcome-header h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--text-light);
}

.app-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: 25px;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px;
  background: var(--bg-tertiary);
  border-radius: 14px;
  text-align: left;
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.feature-icon.c-1 {
  background: linear-gradient(135deg, #00b09b, #96c93d);
}

.feature-icon.c-2 {
  background: linear-gradient(135deg, #ff512f, #dd2476);
}

.feature-icon.c-3 {
  background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.feature-icon.c-4 {
  background: linear-gradient(135deg, #fa709a, #fee140);
}

.feature-text {
  flex: 1;
}

.feature-text strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.feature-text span {
  display: block;
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.4;
}

/* Social Proof Stats */
.social-proof-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.proof-card {
  background: var(--bg-tertiary);
  padding: 20px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.proof-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.proof-icon {
  width: 55px;
  height: 55px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.proof-icon.icon-yellow {
  background: linear-gradient(135deg, #f6d365, #fda085);
}

.proof-icon.icon-cyan {
  background: linear-gradient(135deg, #89f7fe, #66a6ff);
}

.proof-icon.icon-purple {
  background: linear-gradient(135deg, #a18cd1, #fbc2eb);
}

.proof-icon.icon-green {
  background: linear-gradient(135deg, #11998e, #38ef7d);
}

.proof-text {
  flex: 1;
  text-align: left;
}

.proof-text h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 5px 0;
}

.proof-text p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.3;
}

/* Login Section */
.login-section {
  margin-bottom: 30px;
}

.login-prompt {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.secondary-actions {
  margin-top: 15px;
}

.btn-text-only {
  background: transparent;
  color: var(--text-light);
  box-shadow: none;
  font-size: 0.9rem;
  padding: 10px;
}

.btn-text-only:hover {
  background: var(--bg-tertiary);
  color: var(--text-dark);
}

.license-info {
  margin-top: 20px;
  font-size: 0.95rem;
  color: var(--text-light);
}

.license-info a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.license-info a:hover {
  color: var(--secondary-color);
}

/* Why Us Section */
.why-us-container {
  margin-bottom: 30px;
}

.section-title-center {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 25px;
  text-align: center;
}

.why-us-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.why-card {
  background: var(--bg-tertiary);
  padding: 20px;
  border-radius: 14px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: all 0.3s ease;
}

.why-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.why-icon {
  width: 55px;
  height: 55px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.why-icon.w-1 {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.why-icon.w-2 {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}

.why-icon.w-3 {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.why-icon.w-4 {
  background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.why-content {
  flex: 1;
  text-align: left;
}

.why-content h4 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 10px 0;
}

.why-content p {
  font-size: 0.95rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
}

/* Testimonials Section */
.testimonials-container {
  margin-bottom: 30px;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.testi-card {
  background: var(--bg-tertiary);
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.testi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.testi-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.testi-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.testi-info {
  flex: 1;
  text-align: left;
}

.testi-info h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 5px 0;
}

.stars {
  display: flex;
  gap: 3px;
}

.stars i {
  font-size: 0.85rem;
  color: #ffd700;
}

.testi-text {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
  text-align: left;
}

/* Developer Credit Slim */
.developer-credit-slim {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.developer-credit-slim small {
  font-size: 0.85rem;
  color: var(--text-light);
}

.developer-credit-slim strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* ========================================
   END WELCOME PAGE ELEMENTS
   ======================================== */

.buy-license-prompt {
  margin-top: 25px;
  font-weight: 500;
  font-size: 0.9rem;
}
.buy-license-link-action {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 2px solid rgba(255, 107, 107, 0.3);
  transition: all 0.2s;
}
.buy-license-link-action:hover {
  border-color: var(--accent-color);
}

/* Developer Credit */
.developer-credit {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.85rem;
  color: #aaa;
}
.developer-credit .img-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  margin-bottom: 10px;
}
.developer-credit img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  display: block;
}

/* ========================================
   MAIN MENU CONTAINER - DESKTOP STYLES
   ======================================== */

#main-menu-container {
  max-width: 900px;
  padding: 40px;
}

#main-menu-welcome-user {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: var(--text-dark);
  font-weight: 700;
}

#main-menu-container h3 {
  font-size: 1.3rem;
  margin-bottom: 25px;
  color: var(--text-light);
  font-weight: 600;
}

/* Daily Stats Panel */
#daily-stats-panel {
  margin-bottom: 30px;
  background: var(--bg-tertiary);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 15px;
}

.stat-card {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.85rem;
  line-height: 1.3;
  color: var(--text-light);
  font-weight: 500;
}

.progress-bar-container {
  height: 10px;
  background: var(--bg-secondary);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
  border-radius: 10px;
}

/* Blue Print Menu Link */
#main-menu-container a {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 0 25px 0;
  text-decoration: none;
}

/* ========================================
   END MAIN MENU CONTAINER
   ======================================== */

/* Card Menu Grid */
.card-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}
.card-menu-grid-dense {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.card-menu-item {
  background: white;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  text-align: left;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  margin: 0;
  width: 100%;
  height: 100%;
}
.card-menu-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0, 0);
}

.card-menu-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  margin-right: 20px;
  flex-shrink: 0;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* Card Colors - Gradients */
.card-color-1 {
  background: linear-gradient(135deg, #00b09b, #96c93d);
}
.card-color-2 {
  background: linear-gradient(135deg, #ff512f, #dd2476);
}
.card-color-3 {
  background: linear-gradient(135deg, #e55d87, #5fc3e4);
}
.card-color-4 {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}
.card-color-5 {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
}
.card-color-6 {
  background: linear-gradient(135deg, #43e97b, #38f9d7);
}
.card-color-7 {
  background: linear-gradient(135deg, #fa709a, #fee140);
}
.card-color-8 {
  background: linear-gradient(135deg, #667eea, #764ba2);
}
.card-color-9 {
  background: linear-gradient(135deg, #89f7fe, #66a6ff);
}
.card-color-10 {
  background: linear-gradient(135deg, #a18cd1, #fbc2eb);
}
.card-color-11 {
  background: linear-gradient(135deg, #ff9a9e, #fecfef);
}
.card-color-12 {
  background: linear-gradient(135deg, #f6d365, #fda085);
}
.card-color-13 {
  background: linear-gradient(135deg, #84fab0, #8fd3f4);
}
.card-color-14 {
  background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
}
.card-color-15 {
  background: linear-gradient(135deg, #11998e, #38ef7d);
}
.card-color-default {
  background: linear-gradient(135deg, #cfd9df, #e2ebf0);
  color: #555 !important;
}

.card-menu-text {
  display: flex;
  flex-direction: column;
}
.card-menu-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #2d3436;
  margin-bottom: 5px;
}
.card-menu-description {
  flex-grow: 1;
  font-size: 0.85rem;
  color: #636e72;
  line-height: 1.4;
}

/* --- QUIZ LAYOUT ADJUSTMENTS --- */
#quiz-layout-container {
  display: flex;
  gap: 30px;
  max-width: 1400px; /* Increased to allow wider content */
  width: 98%;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: none;
}
#quiz-main-content {
  flex: 4; /* Gives main content 80% width relative to sidebar */
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-soft);
  text-align: left;
  display: flex;
  flex-direction: column;
}
#quiz-sidebar {
  flex: 1; /* Sidebar takes remaining space */
  max-width: 320px; /* Limit width */
  min-width: 250px;
  background: #f8f9fa;
  border-radius: 20px;
  padding: 25px;
  box-shadow: var(--shadow-soft);
  height: fit-content;
}

#question-header-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f1f2f6;
  color: var(--text-light);
  font-weight: 500;
  font-size: 1.1rem;
}
#timer-display-main {
  color: var(--accent-color);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem; /* Larger timer */
}

/* User Profile in Sidebar - SCALED DOWN */
#user-biodata {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
  margin-bottom: 20px;
}
#user-photo-icon {
  width: 60px; /* Fixed small size */
  height: 60px; /* Fixed small size */
  margin-bottom: 12px;
}
#user-photo-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
#user-name-display {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* Question & Options - SCALED UP */
#question {
  font-size: 1.5rem; /* Large readable text */
  font-weight: 500;
  color: #2d3436;
  margin-bottom: 35px;
  line-height: 1.6;
}

#options-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.option-button {
  width: 100%;
  padding: 20px 25px; /* Comfortable padding */
  background: #ffffff;
  border: 2px solid #e1e4e8;
  border-radius: 12px;
  text-align: left;
  font-family: var(--font-main);
  font-size: 1.2rem; /* Larger option text */
  color: #444;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.option-button:hover:not(:disabled) {
  border-color: var(--primary-color);
  background: #f0f7ff;
  transform: translateX(5px);
}
.option-button.selected-tryout {
  background: #e3f2fd;
  border-color: #2196f3;
  color: #1565c0;
  font-weight: 600;
}
.option-button.correct {
  background: #d4edda !important;
  border-color: #28a745 !important;
  color: #155724 !important;
}
.option-button.incorrect {
  background: #f8d7da !important;
  border-color: #dc3545 !important;
  color: #721c24 !important;
}

/* Navigation Grid */
#question-navigation-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 5 items per row */
  gap: 8px; /* Tighter spacing */
  margin-top: 15px;
  max-height: 400px;
  overflow-y: auto;
  padding: 5px;
}
.nav-question-box {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid #dfe6e9;
  border-radius: 6px; /* Less rounded for density */
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: #636e72;
}
.nav-question-box:hover {
  background: #f1f2f6;
  border-color: #b2bec3;
}
.nav-question-box.current {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 4px 10px rgba(74, 144, 226, 0.4);
}
.nav-question-box.answered {
  background: #00b894;
  color: white;
  border-color: #00b894;
}
.nav-question-box.doubtful {
  background: #fdcb6e;
  color: white;
  border-color: #fdcb6e;
}

/* Result Container */
#result-container {
  background: white;
  max-width: 700px;
}
.result-header-icon {
  margin-bottom: 20px;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

#score {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 15px;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 30px;
  text-align: left;
}

#result-actions button {
  margin: 8px;
}
.btn-home {
  background: linear-gradient(135deg, #ff9966, #ff5e62);
  box-shadow: 0 4px 15px rgba(255, 94, 98, 0.4);
}
.btn-review {
  background: linear-gradient(135deg, #1fa2ff, #12d8fa, #a6ffcb);
  box-shadow: 0 4px 15px rgba(31, 162, 255, 0.4);
  color: #0f4c75;
}
.btn-retry {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

/* Footer */
#footer {
  margin-top: auto;
  width: 100%;
  padding: 20px;
  text-align: center;
  color: rgba(0, 0, 0, 0.4);
  font-size: 0.9rem;
}

/* Responsiveness */
/* Responsiveness */
@media (max-width: 992px) {
  #quiz-layout-container {
    flex-direction: column;
  }
  #quiz-main-content {
    order: 1;
    padding: 30px;
  }
  #quiz-sidebar {
    order: 2;
    max-width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
  }
  #user-biodata {
    flex-direction: row;
    border-bottom: none;
    border-right: 1px solid #e0e0e0;
    padding-right: 20px;
    padding-bottom: 0;
    margin-bottom: 0;
    margin-right: 20px;
    gap: 15px;
    width: auto;
    justify-content: flex-start;
  }
  #question-navigation-panel {
    flex: 1;
    min-width: 200px;
  }
  #question-navigation-grid {
    max-height: 180px;
  }
}

@media (max-width: 600px) {
  body {
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: hidden !important;
  }
  
  .container-view {
    padding: 15px !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    box-sizing: border-box !important;
  }

  h1 {
    font-size: 1.6rem;
    margin-bottom: 15px;
  }
  h2 {
    font-size: 1.4rem;
  }
  h3 {
    font-size: 1.2rem;
  }

  #question-header-bar {
    font-size: 0.9rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
  }
  #timer-display-main {
    font-size: 1rem;
  }

  #quiz-main-content {
    padding: 20px;
    border-radius: 15px;
  }

  #question {
    font-size: 1.15rem; /* Readable prompt on mobile */
    line-height: 1.5;
    margin-bottom: 25px;
  }

  .option-button {
    padding: 15px;
    font-size: 1rem;
    border-radius: 10px;
  }

  /* Stack sidebar elements on very small screens */
  #quiz-sidebar {
    flex-direction: column;
    gap: 15px;
    padding: 20px;
  }

  #user-biodata {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    padding-right: 0;
    padding-bottom: 15px;
    margin-right: 0;
    margin-bottom: 10px;
    justify-content: center;
  }

  #user-photo-icon {
    width: 50px;
    height: 50px;
  }

  #question-navigation-grid {
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 8px;
    max-height: 220px;
    padding: 2px;
  }
  .nav-question-box {
    font-size: 0.9rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }
  
  #main-menu-container {
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
    box-sizing: border-box !important;
  }
  
  /* Front Page Mobile Proportions - FIXED FOR 1 COLUMN GRID START */
  .card-menu-grid {
    display: grid !important;
    grid-template-columns: 1fr !important; /* 1 Column Only */
    gap: 15px !important;
    margin: 0 !important;
    padding: 0 5px !important;
    width: 100%;
    box-sizing: border-box !important;
  }
  
  .card-menu-item {
    padding: 20px 15px !important;
    min-height: auto !important; /* Biarkan tinggi menyesuaikan konten */
    border-radius: 16px !important;
    display: flex !important;
    flex-direction: column !important; /* VERTICAL LAYOUT: Icon Top, Text Bottom */
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 12px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    width: 100% !important;
  }
  
  .card-menu-icon-wrapper {
    width: 70px !important; /* Icon lebih besar */
    height: 70px !important;
    font-size: 2.2rem !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    border-radius: 18px !important;
  }
  
  .card-menu-icon-wrapper i {
    font-size: 2.2rem !important;
  }
  
  .card-menu-text {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 5px !important;
    width: 100% !important;
  }
  
  .card-menu-title {
    font-size: 1.1rem !important;
    margin-bottom: 0;
    line-height: 1.3;
    text-align: center !important;
    white-space: normal !important;
  }
  
  .card-menu-description {
    font-size: 0.85rem !important;
    line-height: 1.4;
    display: block !important;
    text-align: center !important;
    color: #636e72 !important;
  }
  /* Front Page Mobile Proportions - END */

  #main-menu-welcome-user {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }
}

/* --- LEADERBOARD STYLE --- */
.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}
.leaderboard-row {
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
}
.leaderboard-row:hover {
  transform: scale(1.02);
}
.leaderboard-cell {
  padding: 15px;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}
.leaderboard-cell:first-child {
  border-left: 1px solid #f0f0f0;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  width: 50px;
}
.leaderboard-cell:last-child {
  border-right: 1px solid #f0f0f0;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  text-align: right;
  font-weight: bold;
  color: var(--secondary-color);
}
.rank-1 {
  background: linear-gradient(135deg, #ffd700 0%, #fff 100%);
  border: 2px solid #ffd700;
}
.rank-2 {
  background: linear-gradient(135deg, #c0c0c0 0%, #fff 100%);
  border: 2px solid #c0c0c0;
}
.rank-3 {
  background: linear-gradient(135deg, #cd7f32 0%, #fff 100%);
  border: 2px solid #cd7f32;
}

/* --- BOOKMARK STYLE --- */
#bookmark-button {
  background: transparent;
  border: none;
  color: #b2bec3;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: none;
  padding: 0 10px;
}
#bookmark-button.bookmarked {
  color: #ffda79;
  transform: scale(1.2);
}
#bookmark-button:hover {
  color: #ffeaa7;
  transform: scale(1.1);
}

.bookmark-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  border-left: 5px solid var(--secondary-color);
  cursor: pointer;
  transition: all 0.2s;
}
.bookmark-card:hover {
  transform: translateY(-5px);
}
.bookmark-preview {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bookmark-meta {
  font-size: 0.8rem;
  color: #888;
}
.delete-bookmark-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff7675;
  color: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  box-shadow: none;
}

/* --- HISTORY ITEM CARD STYLE --- */
.history-item-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-left: 5px solid var(--primary-color);
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: transform 0.2s;
  position: relative;
  overflow: hidden;
}
.history-item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.history-item-card::before {
  content: "\f080"; /* FontAwesome chart icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: -10px;
  bottom: -10px;
  font-size: 5rem;
  color: rgba(0, 0, 0, 0.03);
  transform: rotate(-15deg);
}

.history-item-card h4 {
  margin: 0 0 10px 0;
  color: var(--text-dark);
  font-size: 1.2rem;
  font-weight: 700;
}
.history-item-card p {
  margin: 5px 0;
  font-size: 0.95rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- ENHANCED LEADERBOARD STYLE --- */
.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px; /* More spacing */
  margin-top: 10px;
}
.leaderboard-row {
  background: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.leaderboard-row:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}
.leaderboard-cell {
  padding: 18px 15px;
  vertical-align: middle;
  border: none;
}
.leaderboard-cell:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  font-weight: 800;
  font-size: 1.2rem;
  color: #b2bec3;
  text-align: center;
  width: 60px;
  background: #f8f9fa;
}
.leaderboard-cell:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  text-align: right;
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.1rem;
}

/* Rank Specific Styles */
.rank-1 .leaderboard-cell:first-child {
  background: linear-gradient(135deg, #ffd700 0%, #fdb931 100%);
  color: white;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-size: 1.5rem;
}
.rank-2 .leaderboard-cell:first-child {
  background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
  color: #555;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}
.rank-3 .leaderboard-cell:first-child {
  background: linear-gradient(135deg, #cd7f32 0%, #a0522d 100%);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.leaderboard-cell div:first-child {
  font-size: 1rem;
  color: #2d3436;
  margin-bottom: 2px;
}
.leaderboard-cell div:last-child {
  font-size: 0.8rem;
  color: #636e72;
  font-style: italic;
}

/* --- BACK BUTTON FOOTER STYLE --- */
.back-button-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  margin: 30px auto 0 auto; /* Center horizontally */
  padding: 15px 30px;
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  color: white !important;
  border-radius: 50px;
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  font-weight: 600;
  letter-spacing: 0.5px;
  font-size: 1rem;
  cursor: pointer;
}
.back-button-footer:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(108, 92, 231, 0.5);
}
.back-button-footer i {
  margin-right: 10px;
  font-size: 1.2rem;
}
.back-button-footer span {
  display: inline-block;
}

/* --- DARK MODE TOGGLE BUTTON --- */
#theme-toggle-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-dark);
}

#theme-toggle-btn:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: var(--shadow-hover);
}

#theme-toggle-btn i {
  transition: transform 0.3s ease;
}

/* Smooth theme transition */
body,
.container-view,
.card-menu-item,
.option-button,
.nav-question-box,
input,
select,
#quiz-main-content,
#quiz-sidebar {
  transition:
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

/* Update body background to use variable */
body {
  background: var(--body-gradient) !important;
}

/* Update card backgrounds */
.card-menu-item {
  background: var(--card-bg);
}

#quiz-main-content {
  background: var(--bg-secondary);
}

#quiz-sidebar {
  background: var(--bg-tertiary);
}

/* Update input/select backgrounds */
input[type="text"],
select {
  background: var(--input-bg);
  border-color: var(--border-color);
  color: var(--text-dark);
}

/* Update option buttons */
.option-button {
  background: var(--option-bg);
  border-color: var(--border-color);
  color: var(--text-dark);
}

.option-button:hover:not(:disabled) {
  background: var(--option-hover-bg);
}

/* Update navigation boxes */
.nav-question-box {
  background: var(--nav-box-bg);
  border-color: var(--border-color);
}

/* Dark mode specific overrides */
body.dark-mode #license-form-container {
  background: var(--bg-secondary);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
  color: var(--text-dark);
}

body.dark-mode #score {
  background: var(--bg-tertiary);
}

body.dark-mode .history-item-card {
  background: var(--card-bg);
  border-color: var(--border-color);
}

body.dark-mode .leaderboard-row {
  background: var(--card-bg);
}

body.dark-mode .leaderboard-cell {
  border-color: var(--border-color);
}

body.dark-mode .bookmark-card {
  background: var(--card-bg);
}

body.dark-mode #result-container {
  background: var(--bg-secondary);
}

/* --- DAILY STREAK & TARGET DISPLAY --- */
#daily-stats-panel {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px;
  border-radius: 16px;
  margin-bottom: 25px;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.stats-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 150px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  padding: 18px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
  opacity: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 5px;
  color: #ffffff !important;
  opacity: 1;
  text-shadow:
    0 3px 6px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

.stat-label {
  font-size: 0.95rem;
  color: #ffffff !important;
  font-weight: 600;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.3px;
}

.progress-bar-container {
  margin-top: 15px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  height: 12px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #50e3c2, #4facfe);
  border-radius: 20px;
  transition: width 0.5s ease;
}

/* --- ACHIEVEMENT NOTIFICATION --- */
.achievement-popup {
  position: fixed;
  top: 100px;
  right: -400px;
  width: 350px;
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-left: 5px solid #ffd700;
}

.achievement-popup.show {
  right: 20px;
}

.achievement-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.achievement-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-right: 15px;
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.achievement-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2d3436;
  margin-bottom: 3px;
}

.achievement-subtitle {
  font-size: 0.85rem;
  color: #636e72;
}

.achievement-description {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.5;
}

/* Dark mode achievement popup */
body.dark-mode .achievement-popup {
  background: var(--card-bg);
  color: var(--text-dark);
}

body.dark-mode .achievement-title {
  color: var(--text-dark);
}

body.dark-mode .achievement-subtitle,
body.dark-mode .achievement-description {
  color: var(--text-light);
}

/* ========================================
   PHASE 2: ANALYTICS & INSIGHTS STYLES
   ======================================== */

/* --- ANALYTICS DASHBOARD --- */
.analytics-dashboard {
  max-width: 1200px;
  margin: 0 auto;
}

.analytics-section {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}

.analytics-section:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.analytics-section h3 {
  color: var(--text-dark);
  margin-bottom: 20px;
  font-size: 1.3rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

/* Category Performance Bars */
.category-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.category-bar {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 15px;
  transition: all 0.3s ease;
}

.category-bar:hover {
  background: var(--option-hover-bg);
  transform: translateX(5px);
}

.category-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.category-name {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 1.05rem;
}

.category-accuracy {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 10px;
  transition: width 0.5s ease;
}

.category-details {
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: right;
}

.no-data {
  text-align: center;
  color: var(--text-light);
  padding: 40px;
  font-size: 1.1rem;
}

/* Weakness & Strength Grid */
.weakness-strength-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.weakness-box,
.strength-box {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 20px;
}

.weakness-box h4 {
  color: #ff6b6b;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.strength-box h4 {
  color: #51cf66;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.weakness-item,
.strength-item {
  background: var(--card-bg);
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-weight: 500;
  color: var(--text-dark);
  border-left: 4px solid;
}

.weakness-item {
  border-left-color: #ff6b6b;
}

.strength-item {
  border-left-color: #51cf66;
}

/* Monthly Chart */
.monthly-chart {
  padding: 20px 0;
}

.chart-bars {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 250px;
  gap: 15px;
}

.chart-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.chart-bar {
  width: 100%;
  background: linear-gradient(180deg, #667eea, #764ba2);
  border-radius: 8px 8px 0 0;
  position: relative;
  min-height: 30px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8px;
  transition: all 0.3s ease;
}

.chart-bar:hover {
  transform: scaleY(1.05);
  box-shadow: 0 -5px 20px rgba(102, 126, 234, 0.4);
}

.chart-value {
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}

.chart-label {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.chart-accuracy {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Difficulty Stats */
.difficulty-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.difficulty-item {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 15px;
}

.difficulty-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.difficulty-label {
  font-weight: 700;
  font-size: 1.05rem;
}

.difficulty-accuracy {
  font-weight: 700;
  font-size: 1.1rem;
}

.difficulty-stats-text {
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: right;
  margin-top: 5px;
}

/* Heatmap Calendar */
.heatmap-calendar {
  padding: 20px;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  gap: 4px;
  margin-bottom: 15px;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

.heatmap-cell:hover {
  transform: scale(1.2);
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.heatmap-cell.intensity-0 {
  background: var(--bg-tertiary);
  color: var(--text-light);
}

.heatmap-cell.intensity-1 {
  background: #c3e6cb;
  color: #155724;
}

.heatmap-cell.intensity-2 {
  background: #51cf66;
  color: white;
}

.heatmap-cell.intensity-3 {
  background: #37b24d;
  color: white;
}

.heatmap-cell.intensity-4 {
  background: #2b8a3e;
  color: white;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-light);
}

.legend-boxes {
  display: flex;
  gap: 4px;
}

.legend-box {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

/* --- SMART FILTER PANEL --- */
.smart-filter-panel {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow-soft);
  max-width: 600px;
  margin: 0 auto;
}

.smart-filter-panel h3 {
  color: var(--text-dark);
  margin-bottom: 25px;
  text-align: center;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.filter-select,
.filter-input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font-main);
  background: var(--input-bg);
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.filter-select:focus,
.filter-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
  outline: none;
}

.filter-actions {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.btn-primary {
  flex: 2;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  flex: 1;
  background: var(--bg-tertiary);
  color: var(--text-dark);
  border: 2px solid var(--border-color);
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--option-hover-bg);
  border-color: var(--primary-color);
}

.filter-results {
  margin-top: 20px;
  padding: 15px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--text-light);
  text-align: center;
}

/* --- POMODORO TIMER --- */
.pomodoro-container {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow-soft);
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}

.pomodoro-container h3 {
  color: var(--text-dark);
  margin-bottom: 25px;
}

.pomodoro-display {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 25px;
}

.pomodoro-status {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 15px;
  font-weight: 600;
}

.pomodoro-timer {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary-color);
  font-family: "Courier New", monospace;
  margin-bottom: 15px;
}

.pomodoro-sessions {
  font-size: 1rem;
  color: var(--text-light);
  font-weight: 500;
}

.pomodoro-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 25px;
}

.btn-pomodoro {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.btn-pomodoro:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

.pomodoro-stats {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 20px;
}

.pomodoro-stats h4 {
  color: var(--text-dark);
  margin-bottom: 15px;
  font-size: 1rem;
}

#pomodoro-today-stats {
  color: var(--text-light);
  font-size: 0.95rem;
}

.pomodoro-notification {
  position: fixed;
  top: 100px;
  right: 30px;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  animation: slideInRight 0.4s ease;
  max-width: 300px;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notif-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.notif-message {
  font-size: 0.95rem;
  color: var(--text-light);
}

/* --- COMPARISON DASHBOARD --- */
.comparison-dashboard {
  max-width: 1200px;
  margin: 0 auto;
}

.comparison-section {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-soft);
}

.comparison-section h3 {
  color: var(--text-dark);
  margin-bottom: 20px;
  font-size: 1.3rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

.comparison-card {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.comparison-metric {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metric-label {
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.95rem;
}

.metric-values {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.user-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.vs {
  font-size: 1rem;
  color: var(--text-light);
  font-weight: 500;
}

.avg-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-light);
}

.percentile-bar {
  width: 100%;
  height: 12px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  overflow: hidden;
}

.percentile-fill {
  height: 100%;
  background: linear-gradient(90deg, #51cf66, #37b24d);
  border-radius: 10px;
  transition: width 0.5s ease;
}

.percentile-text {
  text-align: center;
  font-weight: 700;
  color: #37b24d;
  font-size: 1.1rem;
}

/* Category Comparison Grid */
.category-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.category-comparison-item {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 15px;
}

.category-comparison-item .category-name {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 12px;
  font-size: 1rem;
}

.comparison-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.user-bar,
.avg-bar {
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.user-bar {
  background: linear-gradient(90deg, #667eea, #764ba2);
  color: white;
}

.avg-bar {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  color: var(--text-light);
}

.difference {
  text-align: right;
  font-weight: 700;
  font-size: 0.95rem;
}

.difference.positive {
  color: #37b24d;
}

.difference.negative {
  color: #ff6b6b;
}

/* Insights Box */
.insights-box {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 20px;
}

.insight-item {
  background: var(--card-bg);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 1rem;
  color: var(--text-dark);
  border-left: 4px solid var(--primary-color);
  line-height: 1.6;
}

.insight-item:last-child {
  margin-bottom: 0;
}

/* Responsive Adjustments for Phase 2 */
@media (max-width: 768px) {
  .analytics-section,
  .comparison-section {
    padding: 20px;
  }

  .chart-bars {
    height: 180px;
    gap: 8px;
  }

  .chart-value {
    font-size: 0.75rem;
  }

  .heatmap-grid {
    grid-template-columns: repeat(15, 1fr);
    gap: 3px;
  }

  .pomodoro-timer {
    font-size: 2.5rem;
  }
   /* Daily Stats Panel Mobile - 1 COLUMN VERTICAL */
  .stats-row {
    display: grid !important;
    grid-template-columns: 1fr !important; /* 1 Kolom Vertikal */
    gap: 10px !important;
    margin-bottom: 15px !important;
  }

  .stat-card {
    display: flex !important;
    flex-direction: row !important; /* Icon kiri, Teks kanan */
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 15px !important;
    text-align: left !important;
    gap: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .stat-icon {
    font-size: 2rem !important;
    margin-bottom: 0 !important;
    width: 40px !important;
    text-align: center !important;
  }

  .stat-info-wrapper {
    display: flex;
    flex-direction: column;
  }

  .stat-value {
    font-size: 1.4rem !important;
    margin-bottom: 2px !important;
    text-align: left !important;
  }

  .stat-label {
    font-size: 0.9rem !important;
    white-space: normal !important; /* Izinkan text wrap */
    text-align: left !important;
  }

  .metric-values {
    flex-direction: column;
    gap: 10px;
  }

  .user-value {
    font-size: 1.5rem;
  }

  .avg-value {
    font-size: 1.2rem;
  }

  .category-comparison-grid {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    flex-direction: column;
  }
}

/* ========================================
   PHASE 3: GAMIFICATION & ENGAGEMENT STYLES
   ======================================== */

/* === Enhanced Achievement System === */

.enhanced-achievement-popup {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 350px;
  padding: 25px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 10000;
  color: white;
}

.enhanced-achievement-popup.show {
  transform: translateX(0);
  opacity: 1;
}

.achievement-rarity {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.achievement-icon-large {
  font-size: 4rem;
  text-align: center;
  margin: 15px 0;
  animation: bounceIn 0.6s;
}

@keyframes bounceIn {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.achievement-title-large {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}

.achievement-description {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.5;
  margin-bottom: 15px;
}

.achievement-actions {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

.btn-share-achievement {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-share-achievement:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

/* Achievement Showcase */

.achievement-showcase {
  padding: 30px;
  background: var(--bg-secondary);
  border-radius: 16px;
}

.showcase-header {
  margin-bottom: 30px;
  text-align: center;
}

.showcase-progress {
  margin-top: 20px;
}

.progress-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 10px;
  transition: width 0.5s ease;
}

.achievement-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 25px 0;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  color: var(--text-dark);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
  font-size: 0.9rem;
}

.filter-btn.active,
.filter-btn:hover {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: #667eea;
  transform: translateY(-2px);
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.achievement-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.achievement-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #cd7f32, #b87333);
  opacity: 0;
  transition: opacity 0.3s;
}

.achievement-card.silver::before {
  background: linear-gradient(90deg, #c0c0c0, #a8a8a8);
}
.achievement-card.gold::before {
  background: linear-gradient(90deg, #ffd700, #ffed4e);
}
.achievement-card.platinum::before {
  background: linear-gradient(90deg, #e5e4e2, #b9f2ff);
}

.achievement-card.unlocked::before {
  opacity: 1;
}

.achievement-card.unlocked {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.achievement-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.achievement-card.locked {
  opacity: 0.5;
  filter: grayscale(100%);
}

.achievement-card-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.achievement-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.achievement-card-description {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.4;
  margin-bottom: 12px;
}

.achievement-card-rarity {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--bg-tertiary);
  color: var(--text-light);
  letter-spacing: 1px;
}

.btn-share-small {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--primary-color);
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s;
  padding: 5px;
}

.achievement-card:hover .btn-share-small {
  opacity: 1;
}

/* === Flashcard Mode === */

.flashcard-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.flashcard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.stat-item {
  background: var(--card-bg);
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

.flashcard-progress {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.flashcard {
  width: 100%;
  height: 400px;
  perspective: 1000px;
  cursor: pointer;
  margin-bottom: 30px;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 2px solid var(--border-color);
}

.flashcard-front {
  background: linear-gradient(135deg, #667eea15, #764ba215);
}

.flashcard-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #50e3c215, #4a90e215);
}

.flashcard-category {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 6px 12px;
  background: var(--primary-color);
  color: white;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.flashcard-question {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 30px;
}

.flashcard-hint {
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
}

.flashcard-answer {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
}

.flashcard-explanation {
  font-size: 1rem;
  color: var(--text-dark);
  line-height: 1.6;
  text-align: left;
  padding: 20px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 10px;
  border-left: 4px solid var(--secondary-color);
}

.flashcard-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.btn-flashcard {
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-dark);
}

.btn-flashcard.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: #667eea;
}

.btn-flashcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.flashcard-rating {
  text-align: center;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: 12px;
}

.flashcard-rating p {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.rating-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.btn-rating {
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
  font-size: 0.9rem;
}

.btn-wrong {
  background: #fee;
  color: #c33;
  border-color: #fcc;
}

.btn-wrong:hover {
  background: #fdd;
  border-color: #c33;
}

.btn-hard {
  background: #ffe;
  color: #c93;
  border-color: #ffc;
}

.btn-hard:hover {
  background: #ffd;
  border-color: #c93;
}

.btn-good {
  background: #efe;
  color: #3c3;
  border-color: #cfc;
}

.btn-good:hover {
  background: #dfd;
  border-color: #3c3;
}

.btn-easy {
  background: #eff;
  color: #3cc;
  border-color: #cff;
}

.btn-easy:hover {
  background: #dff;
  border-color: #3cc;
}

/* === Custom Quiz Builder === */

.quiz-builder {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px;
}

.builder-header {
  text-align: center;
  margin-bottom: 30px;
}

.builder-header h2 {
  margin-bottom: 10px;
}

.builder-header p {
  color: var(--text-light);
  font-size: 1rem;
}

.builder-form {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 1rem;
  transition: all 0.3s;
  box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.question-selector {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.question-selector h3 {
  margin-bottom: 15px;
  color: var(--text-dark);
}

.selector-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.filter-select,
.filter-input {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.95rem;
}

.question-list {
  max-height: 400px;
  overflow-y: auto;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  background: var(--bg-tertiary);
}

.question-item {
  background: var(--card-bg);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  transition: all 0.2s;
}

.question-item:hover {
  background: var(--bg-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.question-checkbox {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.question-label {
  flex: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.question-number {
  font-weight: 700;
  color: var(--primary-color);
  min-width: 40px;
}

.question-text {
  flex: 1;
  color: var(--text-dark);
}

.question-category {
  font-size: 0.8rem;
  padding: 4px 10px;
  background: var(--secondary-color);
  color: white;
  border-radius: 6px;
  font-weight: 600;
}

.builder-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

.saved-quizzes {
  margin-top: 40px;
}

.saved-quizzes h3 {
  margin-bottom: 20px;
  color: var(--text-dark);
}

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.quiz-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s;
}

.quiz-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.quiz-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.quiz-card h4 {
  font-size: 1.2rem;
  color: var(--text-dark);
  margin: 0;
}

.quiz-card-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-dark);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.btn-icon:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.btn-icon.btn-danger {
  color: var(--accent-color);
}

.btn-icon.btn-danger:hover {
  background: var(--accent-color);
  color: white;
}

.quiz-description {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.5;
}

.quiz-stats {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.quiz-stats span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.quiz-share-code {
  font-size: 0.8rem;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  text-align: center;
  color: var(--text-dark);
}

.quiz-share-code strong {
  color: var(--primary-color);
  font-size: 1rem;
  letter-spacing: 1px;
}

/* Empty State */

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 5rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.empty-state p {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 25px;
}

/* New card colors for Phase 3 menu items */
.card-color-12 {
  background: linear-gradient(135deg, #ffd89b, #19547b);
}
.card-color-13 {
  background: linear-gradient(135deg, #f2709c, #ff9472);
}
.card-color-14 {
  background: linear-gradient(135deg, #96e6a1, #d4fc79);
}

/* Responsive for Phase 3 */
@media (max-width: 768px) {
  .enhanced-achievement-popup {
    width: 90%;
    right: 5%;
    top: 10px;
  }

  .achievement-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

  .flashcard-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .flashcard {
    height: 350px;
  }

  .flashcard-front,
  .flashcard-back {
    padding: 25px;
  }

  .flashcard-question,
  .flashcard-answer {
    font-size: 1.2rem;
  }

  .rating-buttons {
    grid-template-columns: repeat(2, 1fr);
  }

  .quiz-grid {
    grid-template-columns: 1fr;
  }

  .builder-actions {
    flex-direction: column;
  }

  .selector-filters {
    flex-direction: column;
  }
}

/* ======================================== PHASE 4: PWA & NOTIFICATIONS STYLES ======================================== */

/* PWA Install Banner */

.card-color-15 {
  background: linear-gradient(135deg, #11998e, #38ef7d);
}

/* ======================================== 
   WELCOME PAGE REDESIGN & ENHANCEMENTS 
   ======================================== */

.welcome-container {
  max-width: 900px !important;
  padding: 0 !important;
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;
  background: white !important;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  position: relative;
  border: none !important;
  margin-bottom: 50px;
}

.welcome-header {
  width: 100%;
  padding: 40px 40px 10px 40px;
  text-align: center;
  box-sizing: border-box;
}

.welcome-header h1 {
  font-size: 2.8rem;
  margin-bottom: 5px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.welcome-header h3 {
  margin-top: 0;
  font-weight: 500;
  color: #888;
}

.app-description {
  max-width: 600px;
  margin: 10px auto;
  color: #555;
  line-height: 1.6;
}

.logo-circle {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #ffe000 0%, #799f0c 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px auto 20px auto;
  box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
  color: white;
  font-size: 2.5rem;
  animation: floatLogo 3s ease-in-out infinite;
}

@keyframes floatLogo {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
  padding: 20px 40px;
  box-sizing: border-box;
}

.feature-item {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.2s;
  border: 1px solid #eee;
}

.feature-item:hover {
  transform: translateY(-5px);
  background: white;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.feature-icon {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.c-1 {
  background: linear-gradient(45deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
}
.c-2 {
  background: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
}
.c-3 {
  background: linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);
  color: #555;
}
.c-4 {
  background: linear-gradient(to right, #43e97b 0%, #38f9d7 100%);
}

.feature-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.feature-text strong {
  color: #333;
  font-size: 1rem;
  margin-bottom: 2px;
}

.feature-text span {
  font-size: 0.8rem;
  color: #888;
}

/* Social Proof Stats */
.social-proof-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 0 40px 20px 40px;
  width: 100%;
  box-sizing: border-box;
}

.proof-card {
  flex: 1 1 200px;
  background: white;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
  transition: transform 0.2s ease;
}

.proof-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.proof-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.icon-yellow {
  background: #fff9c4;
  color: #fbc02d;
}
.icon-cyan {
  background: #e0f7fa;
  color: #00bcd4;
}
.icon-purple {
  background: #f3e5f5;
  color: #ab47bc;
}

.proof-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.proof-text h3 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: #2d3436;
  line-height: 1.1;
}

.proof-text p {
  margin: 4px 0 0 0;
  font-size: 0.85rem;
  color: #636e72;
  font-weight: 500;
}

/* Login Section */
.login-section {
  background: #f4f6f9;
  width: 100%;
  padding: 40px;
  margin-top: 0;
  text-align: center;
  box-sizing: border-box;
}

.login-prompt {
  font-weight: 600;
  color: #444;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.input-container {
  max-width: 400px;
  margin: 0 auto 20px auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-group input,
.input-group select {
  border: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
  padding-left: 50px;
  width: 100%;
  box-sizing: border-box;
}

.input-group .input-icon {
  left: 18px;
  color: #777;
  font-size: 1rem;
}

.btn-primary-gradient {
  width: 100%;
  max-width: 400px;
  padding: 16px;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

/* Secondary Actions */
.secondary-actions {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.btn-text-only {
  background: none;
  color: #888;
  border: none;
  box-shadow: none;
  font-size: 0.9rem;
  padding: 5px 10px;
}

.license-info {
  margin-top: 30px;
  font-size: 0.9rem;
  color: #666;
}

.license-info a {
  color: #667eea;
  text-decoration: none;
  font-weight: 700;
  margin-left: 5px;
}

/* Why Us & Testimonials Styles */
.section-title-center {
  width: 100%;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 30px 0 20px 0;
  color: #333;
  position: relative;
  padding-bottom: 10px;
}

.section-title-center::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(to right, #667eea, #764ba2);
  border-radius: 2px;
}

.why-us-container {
  padding: 0 40px 20px 40px;
  background: #f4f6f9; /* Match login bg so it flows */
  width: 100%;
  box-sizing: border-box;
}

.why-us-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.why-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  transition: transform 0.2s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.why-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.w-1 {
  background: linear-gradient(135deg, #ff512f 0%, #dd2476 100%);
}
.w-2 {
  background: linear-gradient(135deg, #1a2980 0%, #26d0ce 100%);
}
.w-3 {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}
.w-4 {
  background: linear-gradient(135deg, #fc466b 0%, #3f5efb 100%);
}

.why-content h4 {
  margin: 0 0 5px 0;
  font-size: 1rem;
  color: #333;
}

.why-content p {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
  text-align: left;
}

.testimonials-container {
  padding: 0 40px 40px 40px;
  background: #f4f6f9; /* Match login bg */
  border-radius: 0 0 20px 20px;
  width: 100%;
  box-sizing: border-box;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.testi-card {
  background: white;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
  border: 1px solid #f0f0f0;
}

.testi-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.testi-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #555;
  background-size: cover;
}

.t-1 {
  background: #ffeaa7;
  color: #d35400;
}
.t-2 {
  background: #81ecec;
  color: #00b894;
}

.testi-info {
  text-align: left;
}

.testi-info h5 {
  margin: 0;
  font-size: 0.95rem;
  color: #333;
}

.stars {
  color: #f1c40f;
  font-size: 0.8rem;
  margin-top: 2px;
}

.testi-text {
  font-size: 0.9rem;
  color: #555;
  font-style: italic;
  line-height: 1.6;
  margin: 0;
  text-align: left;
}

.developer-credit-slim {
  background: #e9ecef;
  width: 100%;
  padding: 15px;
  font-size: 0.8rem;
  color: #888;
  text-align: center;
  border-radius: 0 0 20px 20px; /* Rounded bottom corners */
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .why-us-container,
  .testimonials-container,
  .social-proof-stats,
  .features-grid,
  .welcome-header,
  .login-section {
    padding: 20px !important;
  }
  .why-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .why-content p {
    text-align: center;
  }
  .welcome-header h1 {
    font-size: 2rem;
  }
}

/* ======================================== 
   ACHIEVEMENT POPUP STYLES 
   ======================================== */
.achievement-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10000;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 350px;
    width: 90%; /* Responsive width */
    border-left: 5px solid #ffd700;
}

/* Mobile Position: Bottom center */
@media (max-width: 600px) {
    .achievement-popup {
        top: auto;
        bottom: 20px;
        right: 50%;
        transform: translateX(50%) translateY(150%); /* Start from below */
        left: auto;
        width: 90%;
        max-width: 400px;
    }
    
    .achievement-popup.show {
        transform: translateX(50%) translateY(0) !important;
    }
}

.achievement-popup.show {
    transform: translateX(0);
}

.achievement-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.achievement-badge {
    width: 50px;
    height: 50px;
    background: #fff9c4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fbc02d;
    flex-shrink: 0;
}

.achievement-title {
    font-weight: 700;
    color: #333;
    font-size: 1rem;
}

.achievement-subtitle {
    font-size: 0.8rem;
    color: #666;
}

.achievement-description {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
    padding-left: 65px; /* Align with text above */
}

/* Close Button Style */
.close-achievement-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: white; /* Beri background agar terlihat jelas */
    border: 1px solid #eee;
    color: #888;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    transition: all 0.2s;
    line-height: 1;
    width: 28px;
    height: 28px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10005 !important; /* Pastikan di atas semua elemen */
    pointer-events: auto !important; /* Pastikan bisa diklik */
}

.close-achievement-btn:hover {
    color: #ff6b6b;
    background: #fff0f0;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* ======================================== 
   MOBILE OPTIMIZATION FIXES (Screen < 480px)
   ======================================== */
@media (max-width: 480px) {
    /* Container Utama: Hilangkan margin berlebih */
    .welcome-container {
        width: 100% !important;
        margin: 0 !important;
        border-radius: 0;
        box-shadow: none;
    }
    
    /* Header: Kecilkan font dan padding */
    .welcome-header {
        padding: 25px 15px 10px 15px;
    }

    .welcome-header h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .welcome-header h3 {
        font-size: 1rem;
    }

    .app-description {
        font-size: 0.9rem;
        padding: 0 10px;
    }

    /* Logo: Kecilkan sedikit */
    .logo-circle {
        width: 65px;
        height: 65px;
        font-size: 2rem;
        margin-bottom: 15px;
    }

    /* Stats: Ubah jadi Grid 2 kolom yang rapi */
    .social-proof-stats {
        padding: 0 15px 20px 15px;
        gap: 10px;
    }

    .proof-card {
        flex: 1 1 45%; /* Paksa 2 kolom */
        min-width: 140px; 
        padding: 15px 10px;
        flex-direction: column; /* Icon di atas */
        text-align: center;
        gap: 8px;
    }

    .proof-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        margin: 0 auto; /* Center icon */
    }

    .proof-text {
        text-align: center;
        align-items: center;
        width: 100%;
    }

    .proof-text h3 {
        font-size: 1.3rem;
    }
    
    .proof-text p {
        font-size: 0.75rem;
        white-space: normal; /* Allow wrap */
    }

    /* Features: List vertikal 1 kolom */
    .features-grid {
        grid-template-columns: 1fr;
        padding: 10px 15px;
        gap: 12px;
    }
    
    .feature-item {
        padding: 15px;
    }

    /* Form Login: Full width */
    .login-section {
        padding: 30px 15px;
    }
    
    .input-container, .btn-primary-gradient {
        width: 100%;
        max-width: 100%;
    }
    
    /* Why Us & Testimoni: 1 Kolom */
    .why-us-container, .testimonials-container {
        padding: 20px 15px 40px 15px;
    }
    
    .why-us-grid, .testimonial-grid {
        grid-template-columns: 1fr;
    }
    
    .why-card {
        flex-direction: row; /* Tetap row biar icon di kiri */
        align-items: flex-start;
        text-align: left;
    }
    
    .why-content p {
        text-align: left;
    }

    /* Footer Credits */
    .developer-credit-slim {
        font-size: 0.7rem;
        padding: 10px;
    }

    /* Fix tombol close achievement di mobile */
    .close-achievement-btn {
        width: 32px; /* Lebih besar biar mudah ditap */
        height: 32px;
        top: 8px;
        right: 8px;
        z-index: 10010; /* Extra high for button */
    }

    /* Padding extra di bagian bawah agar popup tidak menutupi konten */
    .container-view {
        padding-bottom: 100px !important;
    }

    /* PENTING! Tambahkan padding kiri-kanan agar tidak mepet layar */
    body {
        overflow-x: hidden;
    }
    
    .welcome-container {
        width: 95% !important; /* Jangan 100% full */
        margin: 10px auto !important; /* Beri margin atas bawah */
        border-radius: 15px !important; /* Sedikit rounded di mobile */
    }

    /* Override popup position agar tidak nabrak header */
    .achievement-popup {
       bottom: 80px !important; /* Naikkan sedikit dari toolbar bawah */
    }

    /* Styling khusus tombol close baru */
    #force-close-achievement {
        width: 36px !important;
        height: 36px !important;
        top: 12px !important;
        right: 12px !important;
        background: #f8f9fa !important;
        border: 1px solid #ddd !important;
    }

    /* ========================================
       MENU UTAMA MOBILE FIXES (UPDATED)
       ======================================== */
    
    /* Pastikan container menu utama pas di layar */
    #main-menu {
        width: 100% !important;
        padding: 5px 0 !important;
        box-sizing: border-box;
    }

    /* Ubah Grid Menu jadi 1 Kolom Vertikal agar Rapi */
    .card-menu-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }

    /* Styling Kartu Menu */
    .card-menu-item {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important; /* Icon kiri, Teks kanan */
        align-items: center !important;
        padding: 12px 15px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        min-height: 70px !important;
        text-align: left !important;
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
        border: 1px solid #f0f0f0 !important;
    }
    
    .card-menu-item:active {
        transform: scale(0.98);
        background: #fafafa !important;
    }

    /* FIX ICON: Pastikan background dan icon terlihat */
    .card-menu-icon-wrapper {
        width: 45px !important;
        height: 45px !important;
        flex-shrink: 0 !important;
        margin-right: 15px !important;
        margin-bottom: 0 !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.1rem !important;
        color: white !important; /* Text icon putih */
        box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
    }
    
    /* Paksa background warna-warni muncul (re-declare gradients) */
    .card-color-1 { background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 100%) !important; }
    .card-color-2 { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%) !important; }
    .card-color-3 { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%) !important; }
    .card-color-4 { background: linear-gradient(135deg, #fccb90 0%, #d57eeb 100%) !important; }
    .card-color-5 { background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%) !important; }
    .card-color-6 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important; }
    .card-color-7 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important; }
    .card-color-8 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%) !important; }
    .card-color-9 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%) !important; }
    .card-color-10 { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%) !important; }
    .card-color-11 { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) !important; }

    /* Text Container */
    .card-menu-text {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        text-align: left !important;
    }

    /* Judul Menu */
    .card-menu-title {
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        color: #333 !important;
        margin-bottom: 3px !important;
        line-height: 1.2 !important;
        display: block !important;
    }

    /* Deskripsi Menu */
    .card-menu-text span:not(.card-menu-title) {
        font-size: 0.75rem !important;
        color: #777 !important;
        line-height: 1.2 !important;
        display: block !important;
    }

    /* Sembunyikan elemen yang mengganggu layout */
    .app-header {
        padding: 15px !important;
        border-radius: 0 0 20px 20px !important;
        margin-bottom: 20px !important;
    }
    
    /* FIX POPUP ACHIEVEMENT: Lebih Kecil */
    .achievement-popup {
        bottom: 80px !important;
        width: auto !important; /* Auto width mengikuti konten */
        min-width: 250px;
        max-width: 320px !important; /* Batasi max width */
        right: 50% !important;
        left: auto !important;
        transform: translateX(50%) translateY(150%) !important;
        padding: 15px !important;
    }
    
    .achievement-popup.show {
        transform: translateX(50%) translateY(0) !important;
    }
    
    .achievement-header {
        gap: 10px !important;
    }
    
    .achievement-badge {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }
    
    .achievement-title {
        font-size: 0.9rem !important;
    }
    
    .achievement-description {
        font-size: 0.8rem !important;
        padding-left: 50px !important;
        margin-top: -5px !important;
    }
}
