/* body { text-align: center; background: #222; color: white; }
#app {
        width: 90vw;
        height: 70vh;
        background: var(--bg);
        border: var(--border-width) solid var(--border-strong);
}
#rollBtn { padding: 10px 20px; font-size: 20px; cursor: pointer; }
.flexbox {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
} */


/* Improve page look */
body {
        margin: 0;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        background-color: var(--bg);
        color: var(--text);
}
      
h1 {
        margin-bottom: 20px;
        text-shadow: 0 0 10px var(--titlebar-glow-color);
}
      
      /* Dice container */
#app {
        width: 90%;
        margin-bottom: 20px;
        border-radius: var(--radius);
        background-color: var(--bg);
        border: var(--border-width) solid var(--border-strong);
        box-shadow: 0 0 15px var(--accent);
        margin: 10px;
        margin-right: 10px;
        margin-right: 0;
        /* height: 95%; */
        height: 50vh;
}
      
      /* Button styling */
#rollBtn {
        background-color: var(--accent-strong);
        color: var(--text);
        border: var(--border-width) solid var(--border-strong);
        border-radius: var(--radius);
        font-size: 16px;
        font-weight: bold;
        transition: all 0.2s ease;
        box-shadow: 0 0 8px var(--accent);
        padding: 5px;
        margin: 15px 10px 5px 10px;
        width: 98%;
        margin: 10px;
}
      
#rollBtn:hover {
        background-color: var(--accent);
        box-shadow: 0 0 12px var(--accent);
}
      
#rollBtn:active {
        background-color: var(--accent);
        transform: scale(0.97);
}

.flexbox {
        display: flex;
        align-items: center;
        flex-direction: column;
        animation: fadeIn 0.6s ease;
        width: 100%;
        height: 68%;
}

.flexrow {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: center;
  height: 100%;
}

.sidebar {
  width: 20%;
  border: var(--border-width) solid var(--border-strong);
  height: 50vh;
  margin: 5px;
  overflow-y: auto;
  padding-left: 5px;
}

.sidebar-item {
  padding: 8px;
  margin-bottom: 5px;
  background: var(--bg);
  color: var(--text);
  /* border: 1px solid #ddd;
  border-radius: 5px; */
  font-size: 14px;
}
.sidebar-header {
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 5px;
}

@keyframes fadeIn {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
}





input, textarea, select {
        padding: 5px;
        margin-top: 5px;
        border: var(--border-width) solid var(--border-strong);
        border-radius: var(--radius);
        background: var(--bg);
        color: var(--text);
        box-sizing: border-box;
        margin: 5px;
      }
      
      #wheel-title-display {
        display: flex;
        color: var(--text);
        font-size: 2rem;
        justify-content: center;
        align-items: center;
        margin-bottom: 20px;
        text-align: center;
      }
      
      .create-div {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 90%;
        max-width: 600px;
        margin: auto;
        background: var(--accent-strong);
        border-radius: var(--radius);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        border: var(--border-width) solid var(--border-strong);
        color: var(--text);
        padding: 10px 0;
      }
      
      #wheelOfFortune:after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
      }
      
      #wheel-container:not(:has(#wheel-creator)) {
        justify-content: center;
        width: auto;
      }
      
      #wheel-container {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        position: relative;
        width: auto;
        height: 100%;
        padding-right: 20px;
        left: 10px;
      }
      
      #wheel-creator {
        display: flex;
        flex-direction: column;
        width: 45%;
        min-width: 400px;
        max-height: 100%;
        padding: 20px;
        background-color: var(--bg);
        box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);
        border-radius: var(--radius);
        z-index: 1;
        margin-right: 10px;
        color: var(--text);
        border: var(--border-width) solid var(--border-strong);
      }
      
      #title-container,
      #add-segment-container {
        background: var(--bg);
        padding: 10px 0;
        z-index: 2;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        position: sticky;
        top: 0;
      }
      
      #segment-list-container {
        background-color: var(--grid-bg-color);
        flex: 1;
        overflow-y: auto;
        min-height: 300px;
        max-height: calc(60vh - 200px);
        padding: 10px 0;
      }
      
      .segment {
        display: grid;
        grid-template-columns: 20px 1fr auto;
        gap: 1rem;
        align-items: center;
        padding: 0.5rem;
        background-color: var(--bg);
        border: 1px solid var(--border-strong);
        border-radius: var(--radius);
        color: var(--text);
      }
      
      #wheelOfFortune {
        position: relative;
        flex-shrink: 0;
        width: 100%;
        aspect-ratio: 1;
        background: var(--bg);
        border-radius: 50%;
        box-shadow: 0px 0px 20px 1px var(--accent);
        z-index: 2;
        padding: 10px;
        box-sizing: border-box;
        overflow: hidden;
      }
      
      #wheel {
        display: block;
        width: 100%;
        height: 100%;
      }
      
      #spin {
        font-size: clamp(1rem, 2.5vw, 1.5rem);
        font-weight: bold;
        user-select: none;
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20%;
        height: 20%;
        max-width: 100px;
        max-height: 100px;
        transform: translate(-50%, -50%);
        background: var(--bg);
        color: var(--text);
        box-shadow: 0 0 0 8px var(--accent),
                    0 0px 15px 10px rgba(0, 0, 0, 0.8);
        border-radius: 50%;
        z-index: 2;
      }
      
      
      /* Adjust the pointer triangle to remain proportional */
      #spin::after {
        content: "";
        position: absolute;
        top: -17px;
        border: 12px solid transparent;
        border-bottom-color: var(--accent); /* white -> var */
        border-top: none;
      }
      
      /* Title Section */
      #title-section {
        color: var(--text);
        margin-bottom: 20px;
        padding: 10px;
      }
      
      #bg-color-pickers,
      #font-color-pickers {
        display: flex;
        gap: 1rem;
        flex-wrap: wrap;
      }
      
      .color-picker-group {
        display: flex;
        align-items: center;
        gap: 0.5rem;
      }
      
      .color-picker-group input[type="color"] {
        width: 30px;
        height: 30px;
        cursor: pointer;
        border: var(--border-width) solid var(--border-strong);
        border-radius: var(--radius);
        transition: border-color 0.3s;
      }
      
      .color-picker-group input[type="color"]:hover {
        border-color: #888; /* Optional: you can define a --hover-border-color if you want */
      }
      
      .color-picker-group button {
        background-color: #e74c3c; /* Consider adding a variable for delete/danger buttons */
        color: var(--text);
        border: none;
        border-radius: calc(var(--radius) / 2);
        cursor: pointer;
        margin-right: 5px;
        font-size: 0.575rem;
        transition: background-color 0.3s;
      }
      
      .color-picker-group button:hover {
        background-color: #c0392b; /* Same here for hover-danger if needed */
      }
      
      input[type="range"] {
        -webkit-appearance: none;
        appearance: none;
        width: 100%;
        height: 4px;
        background: var(--border-strong);
        border-radius: 2px;
        outline: none;
      }
      
      input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: var(--accent);
        cursor: pointer;
        box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
      }
      
      
      .fontslider {
        width: 170px;
      }
      
      .edit-div {
        display: flex;
        gap: 10px;
        margin-left: auto;
      }
      .edit-button {
        cursor: pointer;
        font-weight: bold;
        border-radius: 50%;
        width: 35px;
        height: 35px;
        text-align: center;
        line-height: 20px;
        margin-left: 10px;
        color: var(--text);
        display: inline-block;
        font-size: 30px;
        justify-content: center;
        align-items: center;
        display: flex;
        margin-left: auto;
      }
      .edit-button a {
        text-decoration: none;
        color: var(--text);
      }
      
      /* Main container */
      #wheel-mini {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: auto;
        background: var(--bg);
        border-radius: var(--radius);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        border: var(--border-width) solid var(--border-strong);
        min-width: 400px;
        min-height: 500px;
        width: 80vw;
        /* height: 70vh; */
        max-width: 800px;
      }
      
      .topflex {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
      }
      
      /* Profile & Title Section */
      #wheel-header {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        background: var(--accent-strong);
        border-radius: var(--radius);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
        border-bottom: var(--border-width) solid var(--border-strong);
      }
      
      #wheel-header-box {
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
      }
      
      .profile-section {
        display: flex;
        align-items: center;
      }
      
      .profile-pic {
        width: 50px;
        aspect-ratio: 1 / 1;
        max-width: 100px;
        max-height: 100px;
        border-radius: 50%;
        border: var(--border-width-big) solid var(--border-strong);
        background: #888; /* fallback for no image */
        overflow: hidden;
        display: flex;
        margin-right: 10px;
        justify-content: center;
        align-items: center;
        box-shadow: 3px 3px 5px 1px var(--bg);
      }
      
      .profile-pic img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
      
      /* Username */
      .username a {
        font-size: 1.2rem;
        font-weight: bold;
        color: var(--link-color);
        text-decoration: none;
        margin-bottom: 10px;
      }
      
      /* Wheel Title */
      #wheel-title-display {
        font-size: 1.5rem;
        font-weight: bold;
        text-align: center;
        color: var(--text);
      }
      
      
      /* Wheel Container */
      #wheel-container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin: 20px;
      }
      .flex-container {
        display: flex;
        margin-right: 10px;
      }
      .column {
        flex-direction: column;
      }
      
      /* Wheel */
      #wheelOfFortune {
        position: relative;
        /* left: 10px; */
      }
      
      /* Wheel Result Display */
      #wheel-result {
        pointer-events: none;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: var(--bg);
        color: var(--text);
        border: var(--border-width-big) solid var(v);
        padding: 15px 20px;
        font-size: 1.5rem;
        font-weight: bold;
        border-radius: var(--radius);
        opacity: 0;
        transition: opacity 0.5s ease-in-out;
        text-align: center;
        width: 80%;
        min-height: 30px;
        z-index: 999;
        max-width: 800px;
      }
      
      /* Input Groups */
      .input-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: center;
        justify-content: space-between;
      }
      
      .input-group > div {
        display: flex;
        flex-direction: column;
        min-width: 100px;
        flex: 1;
      }
      
      .smallinput {
        width: 60px;
        background: var(--bg);
        color: var(--text);
        border: var(--border-width) solid var(--border-strong);
        border-radius: var(--radius);
        padding: 5px;
      }
      
      /* Delete Button */
      button.delete {
        background-color: #cc2e2e;
        color: var(--text);
        padding: 6px 10px;
        border-radius: var(--radius);
        font-size: 0.9rem;
        border: none;
        cursor: pointer;
      }
      
      button.delete:hover {
        background-color: #e44242;
      }
      
      /* Controls Section */
      .controls {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 15px;
      }
      
      /* General Button Styles */
      button {
        padding: 10px 15px;
        font-size: 1rem;
        background-color: var(--accent-strong);
        color: var(--text);
        border: var(--border-width) solid var(--border-strong);
        border-radius: var(--radius);
        cursor: pointer;
        transition: background-color 0.3s ease;
      }
      
      button:hover {
        background-color: var(--accent);
      }
      
      button:active {
        background-color: var(--accent);
      }
      
      
      #info-icon {
        cursor: pointer;
        font-weight: bold;
        border: var(--border-width) solid var(--border-strong);
        border-radius: 50%;
        width: 35px;
        height: 35px;
        text-align: center;
        line-height: 20px;
        margin-left: 10px;
        background-color: var(--bg);
        color: var(--text);
        display: inline-block;
        font-size: 30px;
        justify-content: center;
        align-items: center;
        display: flex;
        box-shadow: 1px 1px 5px 1px var(--bg);
        margin-left: auto;
      }
      
      #game-info-popup, #tease-window, #login-window {
        position: absolute;
        top: 60px; /* adjust based on your layout */
        right: 20px;
        width: 50vw;
        background: var(--bg);
        border: var(--border-width) solid var(--border-strong);
        border-radius: var(--radius);
        box-shadow: 0px 4px 8px var(--bg);
        color: var(--text);
        z-index: 1000;
        padding: 15px;
        left: 25%;
        border-radius: 8px;
      }
      
      #game-info-content, #tease-content, #login-content {
        position: relative;
      }
      
      #close-info, #tease-close, #login-close {
        position: absolute;
        top: 0;
        right: 5px;
        cursor: pointer;
        font-size: 18px;
      }
      
      
      /* Mobile Adjustments */
      @media (max-aspect-ratio: 1/1) {
        #wheel-container {
          flex-direction: column;
          margin: 0;
          margin-top: 20px;
          margin-bottom: 20px;
        }
        #wheel-creator {
          width: 90vw;
          padding: 0;
          margin-bottom: 30px;
        }
      
        button {
          padding: 8px 12px;
          font-size: 0.9rem;
        }

        #app {
          width: 60%;
        }
        .sidebar{
          width: 40%
        }
      
      
        #game-info-popup {
          position: absolute;
          top: 60px; /* adjust based on your layout */
          width: 85vw;
          left: 10px;
        }
        
      
      
      }
      
      
      