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

body, html {
    height: 100%;
    margin: 0;
    overflow: auto;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #252138; /* Dark purple background */
    color: #ffffff; /* White text */
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 1.5rem auto;
    padding: 1.5rem;
    background-color: #252138; /* Dark purple background */
    border-radius: 12px;
    height: auto;
    overflow: visible;
}

.logo-container {
    text-align: center;
    margin-bottom: 40px; /* Increased to add more space below the logo */
}

.logo {
    max-width: 80%;
    height: auto;
    margin: 0 auto;
    display: block;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #dcc694; /* Gold heading */
    font-weight: 700;
    text-shadow: none;
}

h2 {
    color: #dcc694; /* Gold heading */
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.centered-heading {
    text-align: center;
    width: 100%;
}

.setup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 50px;
    min-height: 80vh;
    overflow: auto;
}

.setup-section {
    display: flex;
    gap: 2rem;
    margin: 20px 0 15px;
    margin-top: 20px;
    width: 100%;
    max-width: 300px;
}

.input-group {
    flex: 1;
}

.input-group.full-width {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

textarea {
    width: 100%;
    min-width: 300px;
    height: 150px;
    padding: 1.2rem; /* Increased padding */
    border: 1px solid #dcc694; /* Gold border */
    background-color: #2d2942; /* Slightly lighter purple background */
    color: #dcc694; /* Gold text */
    border-radius: 8px;
    resize: none;
    font-family: inherit;
    font-size: 1.1rem; /* Larger font size */
    margin-bottom: 1rem;
    margin-top: 0.5rem; /* Add space at the top */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    outline: none; /* Remove default focus outline */
    text-align: center;
}

textarea:focus {
    border: 2px solid #dcc694; /* Thicker gold border on focus */
    box-shadow: 0 0 5px rgba(220, 198, 148, 0.5); /* Subtle gold glow */
}

textarea::placeholder {
    color: rgba(220, 198, 148, 0.5); /* Gold with transparency for placeholder */
}

.color-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

select {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.btn {
    display: block;
    width: 100%;
    padding: 12.8px 32px;
    background-color: #dcc694;
    color: #252138;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    margin: 1rem 0;
    box-shadow: 0 0 0 transparent;
}

.btn:hover {
    background-color: #c9b27e; /* Darker gold on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    box-shadow: none;
}

.btn.normal-width {
    width: auto;
    min-width: 200px;
    margin: 1.5rem auto;
    padding: 12.8px 32px;
}

#start-btn {
    width: auto;
    min-width: 200px;
    margin: 1rem auto;
    padding: 12.8px 32px;
}

#spin-btn {
    width: auto;
    min-width: 200px;
    margin: 1rem auto;
    padding: 12.8px 32px;
}

#remove-combos-btn {
    display: block;
    width: 80%;
    min-width: 200px;
    max-width: 420px;
    margin: 0.7rem auto;
    padding: 18px 0;
    box-sizing: border-box;
    font-size: 2rem;
}

#remove-combos-btn.btn,
#start-btn.btn {
    width: 60%;
    min-width: 120px;
    max-width: 260px;
    margin: 0.7rem auto;
    padding: 10px 0;
    font-size: 1.1rem;
}

.wheel-section {
    display: none;
    align-items: flex-start;
    padding-top: 5px;
    height: auto;
    overflow: visible;
}

.players-confirmed .wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1rem 0;
    position: relative;
    margin-top: 0;
}

canvas {
    margin: 1rem 0;
    display: block; /* Prevent inline display issues */
}

.wheel-container canvas {
    position: relative;
    z-index: 1;
    margin-top: 15px;
    margin-bottom: 15px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    border: 3px solid #000000; /* Black border */
}

.current-participant, .pointer, #wheel {
    margin: 0;
    padding: 0;
}

/* Remove this rule as it might be causing positioning issues */
.wheel-container > div:has(canvas) {
    display: none;
}

/* Add a circular clip to ensure the wheel is perfectly round */
#wheel {
    border-radius: 50%;
    transform: translateZ(0); /* Force hardware acceleration */
    backface-visibility: hidden; /* Prevent flickering */
    will-change: transform; /* Hint for browser optimization */
}

/* Style for the celebration canvas */
.celebration-canvas {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
}

/* Confetti animation */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0;
    animation: confetti-fall linear forwards;
    z-index: 100;
    pointer-events: none;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-5%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.current-participant {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-weight: 500;
    text-align: center;
    position: relative;
    z-index: 5;
}

.current-participant span {
    font-weight: 600;
    color: #dcc694; /* Gold text */
}

/* Remove the pointer styling since we're drawing it directly on the canvas */
.pointer {
    display: none;
}

/* Remove the line beneath the arrow */
.pointer::after {
    display: none;
}

.results {
    background-color: #2d2942; /* Slightly lighter purple */
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #dcc694; /* Gold border */
    max-width: 400px;
    margin: 0 auto;
    margin-top: 5px;
    max-height: none; /* Remove height limit */
    overflow-y: visible; /* Disable scrolling */
}

.results h2 {
    text-shadow: none;
    color: #dcc694; /* Gold color */
    font-size: 1.7rem; /* Increased from 1.5rem */
    margin-bottom: 0.5rem;
    text-align: center;
    border-bottom: 1px solid #dcc694;
    padding-bottom: 0.3rem;
}

#results-list {
    margin: 0.3rem 0;
    overflow-y: visible;
    max-height: none;
}

.result-item {
    padding: 5px 8px; /* Increased from 4px 6px */
    display: flex;
    justify-content: space-between;
    background-color: #252138;
    border-radius: 4px;
    margin-bottom: 4px; /* Increased from 3px */
    box-shadow: none;
    transition: all 0.3s;
    font-size: 1rem; /* Increased from 0.9rem to a more readable size */
    line-height: 1.4; /* Added to improve readability */
}

.result-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* Reduced shadow on hover */
}

.result-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.result-item span {
    font-weight: 500;
    color: #ffffff;
    text-shadow: none;
}

.result-item strong {
    color: #dcc694;
    font-weight: 600;
    text-shadow: none;
    margin-left: 8px; /* Add some space between name and colors */
}

/* Toggle Switch Styling */
.no-repeat-toggle-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    gap: 10px;
    padding: 8px 18px 8px 16px;
}

.no-repeat-label {
    font-size: 1.08rem;
    font-family: 'Poppins', sans-serif;
    color: #dcc694;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin-right: 6px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cc3333;
    border-radius: 34px;
    border: 2px solid #ccc;
    transition: background-color 0.4s;
    box-sizing: border-box;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    border-radius: 50%;
    transition: transform 0.4s;
    z-index: 2;
}

.slider-text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: bold;
    color: white;
    letter-spacing: 1px;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.slider-text.off {
    right: 12px;
    left: auto;
    width: 44px;
    text-align: right;
    opacity: 1;
}

.slider-text.on {
    left: 12px;
    right: auto;
    width: 44px;
    text-align: left;
    opacity: 0;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(46px) translateY(-50%);
}

input:checked + .slider .on {
    opacity: 1;
}

input:checked + .slider .off {
    opacity: 0;
}

.slider:after {
    display: none;
}

@media (max-width: 768px) {
    .setup-section {
        flex-direction: column;
    }
    
    .container {
        padding: 1rem;
        margin: 1rem;
    }
    
    canvas {
        width: 300px;
        height: 300px;
    }
    
    .pointer {
        top: 30px;
    }
}

/* Initial state - wheel and results hidden */
.wheel-section {
    display: none;
}

/* State after player confirmation */
.players-confirmed .wheel-section {
    display: block;
}

.players-confirmed .setup-section,
.players-confirmed #start-btn,
.players-confirmed .logo-container {
    display: none;
}

#current-participant-section {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 20px 0;
}

#wheel {
    margin: 0 0 20px 0;
}

#export-btn {
    display: none;
}

.results-export-container {
    text-align: center;
    margin-top: 20px;
}

/* Modal overlay styles */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(37, 33, 56, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #2d2942;
  border-radius: 12px;
  padding: 1.2rem 1.2rem 1rem 1.2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  width: 50vw;
  max-width: 420px;
  min-width: 280px;
  color: #dcc694;
  text-align: center;
  position: relative;
  margin: 0 auto;
}

.combo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem; /* tighter gap */
  margin: 0.7rem 0 1rem 0; /* less margin */
  justify-content: center;
}

.combo-option {
  background: #dcc694;
  color: #252138;
  border-radius: 6px;
  padding: 0.32rem 0.7rem; /* smaller buttons */
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
  margin: 0.1rem;
  outline: none;
  user-select: none;
}

.combo-option.disabled {
  background: #888;
  color: #ccc;
  opacity: 0.6;
  cursor: not-allowed;
  text-decoration: line-through;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.5rem;
}

@media (min-width: 500px) {
  .modal-content {
    min-width: 320px;
    padding: 1.5rem 2rem 1.2rem 2rem;
  }
  .modal-actions {
    flex-direction: row;
    gap: 1rem;
    margin-top: 1rem;
  }
}

@media (max-width: 700px) {
  .modal-content {
    width: 95vw;
    min-width: unset;
    max-width: 98vw;
  }
  #remove-combos-btn,
  #start-btn {
    width: 90vw;
    min-width: unset;
    max-width: 98vw;
    font-size: 1rem;
    padding: 9px 0;
  }
}

@media (max-width: 500px) {
  #remove-combos-btn,
  #start-btn {
    width: 95%;
    min-width: unset;
    max-width: 98vw;
  }
}

/* Modal button custom styles */
#close-combos-btn {
  background: #b04a4a !important; /* dull red */
  color: #fff !important;
  text-transform: uppercase;
  border: none;
  opacity: 1;
}
#close-combos-btn:disabled {
  background: #888 !important;
  color: #ccc !important;
  opacity: 0.7;
}
#save-combos-btn {
  background: #888 !important; /* gray by default */
  color: #fff !important;
  text-transform: uppercase;
  border: none;
  opacity: 0.7;
  cursor: not-allowed;
}
#save-combos-btn.active {
  background: #4aaf6e !important; /* dull green */
  color: #fff !important;
  opacity: 1;
  cursor: pointer;
}
#save-combos-btn:disabled {
  background: #888 !important;
  color: #ccc !important;
  opacity: 0.7;
  cursor: not-allowed;
} 