:root {
    --button-primary-background: #131313;
    --button-primary-hover: #333333;
    --button-outline-hover: #ececec;
    --button-text-on-primary: #ffffff;
    --button-focus-ring-color: rgb(155, 155, 155);
}

html, body {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #121212;
      color: #281636; /* Darker text for better visibility */
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

#container {
    display: flex;
    min-height: 100vh;
}

#sidebar {
    width: 200px;
  background: #1e3b5a;
  padding: 10px;
  color: white;
  display: flex;
  flex-direction: column; /* ✅ this ensures vertical stacking */
}

#sidebar button {
    display: block;
  width: 100%;
  margin: 10px 0;
  padding: 10px;
  background: #2d5b86;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease;
}

#sidebar button:hover {
    background: #3d7bb1;
}

#content {
  flex: 1;
  padding: 25px;
  background-color: #e9f6ff; /* Light blue background */
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
  overflow-y: auto;
}

.generate-container, .quiz-container, .login-container {
    background: #f0f0f0;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    max-width: 600px;
    margin: 50px auto;
    text-align: center;
}

.generate-container h2, .quiz-container h2, .login-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

textarea, input, select {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #fff;
    color: #131313;
}

.btn-primary, .google-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: var(--button-primary-background);
    border: none;
    color: var(--button-text-on-primary);
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 5px 0 #00000033;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn-primary:hover, .google-btn:hover {
    background: var(--button-primary-hover);
    box-shadow: 0 3px 0 #00000033;
    transform: translateY(-2px);
}



.option:hover {
    background: var(--button-outline-hover);
    transform: scale(1.02);
}

.option {
    display: flex;
    align-items: center;
    margin: 10px 0;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
    padding: 8px 12px;
    width: fit-content;      /* 👈 ensures no extra space! */
    min-width: 220px;        /* 👈 optional: consistent width for all */
}
.option input[type="radio"] {
    margin-right: 10px;
    flex-shrink: 0;
}
.option span {
    flex-shrink: 0;
    white-space: pre-line;   /* Handles multi-line text gracefully */
}


.option.correct {
    background: #2e7d32;
    color: #fff;
}

.option.wrong {
    background: #c62828;
    color: #fff;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: explode 1.5s forwards;
    opacity: 0.8;
    z-index: 9999;
}

@keyframes explode {
    from { transform: translate(0, 0); opacity: 1; }
    to   { transform: translate(var(--x), var(--y)) scale(0.5); opacity: 0; }
}

.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    text-align: center;
    max-width: 400px;
    animation: fadeIn 0.4s;
    color: #131313;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

.spinner {
    border: 6px solid #ccc;
    border-top: 6px solid var(--button-primary-background);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    margin: 20px auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.copy-btn {
    background: var(--button-primary-background);
    color: var(--button-text-on-primary);
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    margin-top: 20px;
    font-size: 15px;
}

.copy-btn:hover {
    background: var(--button-primary-hover);
}

#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    background-color: #f9f5fc;
    border-bottom: 1px solid #ddd;
}

#logo {
    font-size: 24px;
    font-weight: bold;
}

#user-info {
    display: flex;
    align-items: center;
}

#user-info span {
    margin-right: 15px;
}

.btn-login, .btn-logout {
    display: block;
  width: 100%;
  margin: 10px 10px;
  padding: 10px;
  background: #2d5b86;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease;
}

.btn-login:hover, .btn-logout:hover {
    background: #3d7bb1;
}

#user-info button {
    display: block;
  width: 100%;
  margin: 10px 0;
  padding: 10px;
  background: #2d5b86;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease;
}

#user-info button:hover {
    background: #3d7bb1;
}

.option-quizzz {
    display: flex;
    align-items: flex-start;
    margin: 16px 0;
    padding: 14px 18px;
    border: 1.5px solid #e0e0e0;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
    transition: background 0.22s, border-color 0.22s;
    font-size: 17px;
    text-align: left;
}
.option-quizzz:hover {
    background: #f8faff;
    border-color: #9ca9ff;
    box-shadow: 0 2px 8px rgba(90,130,255,0.07);
}
.option-quizzz.selected {
    background: #fffacd !important;
    border-color: #ebc434;
}
