:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --text-main: #2d3436;
    --text-light: #636e72;
    --danger: #ff6b6b;
    --success: #1dd1a1;
    --font-main: 'Inter', 'M PLUS Rounded 1c', sans-serif;
  }
  
  * {
    box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
    background-color: #f0f2f5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
    color: var(--text-main);
}

/* Background Blobs */
.glass-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background: #a8c0ff;
  background: linear-gradient(120deg, #a8c0ff 0%, #3f2b96 100%);
}

.blob {
  position: absolute;
  filter: blur(80px);
  z-index: -1;
  animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
  top: 10%;
  left: 10%;
  width: 400px;
  height: 400px;
  background: #ff9a9e;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

.blob-2 {
  bottom: 10%;
  right: 10%;
  width: 350px;
  height: 350px;
  background: #a18cd1;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation-duration: 25s;
}

.blob-3 {
  top: 40%;
  left: 40%;
  width: 300px;
  height: 300px;
  background: #fbc2eb;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation-duration: 22s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  100% {
    transform: translate(50px, 50px) rotate(20deg);
  }
}

/* Glass Card Container */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 24px;
  padding: 2rem 3rem;
  width: 90%;
  max-width: 500px;
  margin: 0 auto;
  /* Center within main */
  display: flex;
  flex-direction: column;
  align-items: center;
    /* Center children horizontally */
  justify-content: flex-start;
  max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
  }
  
  .glass-card::-webkit-scrollbar {
    width: 6px;
  }
  
  .glass-card::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

h1 {
  margin: 0 0 1.5rem 0;
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  text-align: center;
  letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Roulette Wheel */
#roulette-wheel-wrapper {
  position: relative;
  margin: 0 0 2rem 0;
    /* Let flex parent handle horizontal centering */
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
  display: flex;
  justify-content: center;
  width: 100%;
    /* Take full width of parent to allow centering */
}

#roulette-wheel {
  width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 8px solid rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  background: #fff;
    aspect-ratio: 1;
    flex-shrink: 0;
}

#wheel-content {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transition: transform 5s cubic-bezier(0.15, 0.9, 0.3, 1);
}

#roulette-pin {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
    z-index: 10;
    color: var(--danger);
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.2));
  }
  
  .item-label {
    position: absolute;
  top: 50%;
  left: 50%;
    transform-origin: 0 50%;
    text-align: center;
    width: 50%;
    padding-left: 0;
    /* Shift text outwards to visual center */
    box-sizing: border-box;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-size: 1rem;
  white-space: nowrap;
  pointer-events: none;
  line-height: 1;
}

/* Button Styling */
#spin-button {
  width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    background: var(--primary-gradient);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.4);
    letter-spacing: 0.05em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}
#spin-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(118, 75, 162, 0.6);
}

#spin-button:active:not(:disabled) {
  transform: translateY(1px);
}
#spin-button:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
}

#result {
  min-height: 2em;
    margin-top: 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
  text-align: center;
  color: var(--text-main);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    max-width: 280px;
  }
  
  @keyframes popIn {
    from {
      opacity: 0;
      transform: scale(0.8);
    }
  
    to {
      opacity: 1;
      transform: scale(1);
    }
  }
  
  /* Controls */
  .controls-section {
    width: 100%;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#input-container {
  display: flex;
  gap: 0.5rem;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 280px;
    /* Limit width for aesthetics */
  justify-content: center;
}

#item-list-container {
  width: 100%;
  max-width: 280px;
}
#item-input {
  flex: 1;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

#item-input:focus {
  background: #fff;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.2);
}
.btn-icon {
  width: 46px;
  border-radius: 12px;
  border: none;
  background: var(--success);
  color: white;
    font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
  transform: scale(1.05);
}
/* Item List */
#item-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#item-list li {
  background: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
    transition: all 0.2s;
  }
  
  #item-list li:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(2px);
}
#item-list li span {
  font-weight: 500;
    color: var(--text-main);
}

#item-list li button {
  background: none;
  border: none;
  cursor: pointer;
    padding: 4px 8px;
    margin-left: 4px;
  border-radius: 6px;
  font-size: 0.9rem;
    transition: background 0.2s;
}
#item-list li .edit-btn {
  color: var(--text-light);
}
#item-list li .edit-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-main);
}

#item-list li .delete-btn {
  color: #ff6b6b;
}
#item-list li .delete-btn:hover {
  background: rgba(255, 107, 107, 0.1);
}
#item-list li input {
  flex: 1;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ddd;
  margin-right: 8px;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .glass-card {
      padding: 1.5rem;
      width: 95%;
      border-radius: 20px;
  }

  #roulette-wheel {
    width: 260px;
    height: auto;
    /* Allow aspect-ratio to define height */
      aspect-ratio: 1;
  }
#result {
    width: 100%;
    max-width: 280px;
      margin-left: auto;
      margin-right: auto;
    }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                h1 {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  font-size: 1.6rem;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                .item-label {
    font-size: 0.8rem;
      padding-left: 0;
  }
}

/* Article Page Styles */
.article-card {
  max-width: 700px;
}

.article-content {
  width: 100%;
  text-align: left;
  line-height: 1.8;
  color: var(--text-main);
}

.article-content section {
  margin-bottom: 2.5rem;
}

.article-content h2 {
  font-size: 1.5rem;
  color: #764ba2;
  border-bottom: 2px solid rgba(118, 75, 162, 0.3);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-content h3 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem 0;
  color: #555;
  font-weight: 700;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.feature-item {
  background: rgba(255, 255, 255, 0.5);
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
}

.feature-item:hover {
  transform: translateY(-5px);
}

.steps-list {
  padding-left: 1.2rem;
  counter-reset: step;
  list-style: none;
}

.steps-list li {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
}

.steps-list li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: -1.5rem;
  top: 0;
  width: 24px;
  height: 24px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  font-size: 0.8rem;
  font-weight: bold;
}

.use-case-list {
  list-style: none;
  padding: 0;
}

.use-case-list li {
  background: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.8rem;
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-footer {
  margin-top: 3rem;
  text-align: center;
  width: 100%;
}

.btn-back {
  text-decoration: none;
  display: inline-flex;
  border-radius: 50px;
  background: var(--primary-gradient);
  color: white;
  padding: 0.8rem 2rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(118, 75, 162, 0.4);
  transition: all 0.3s;
}

.btn-back:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(118, 75, 162, 0.6);
}

.footer-link {
  margin-top: 2rem;
  display: inline-block;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.8);
  transition: all 0.3s;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.footer-link:hover {
  color: #fff;
  border-bottom-style: solid;
}

@media (max-width: 600px) {
  .article-card {
    padding: 1.5rem;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }
}
