:root {
    --color-primary: hsl(200, 50%, 90%);
    --color-secondary: hsl(200, 50%, 10%);
    --color-accent: hsl(260, 80%, 20%);
    --color-tertiary: hsl(140, 80%, 20%);
}

.dark {
    --color-primary: hsl(200, 50%, 10%);
    --color-secondary: hsl(0, 0%, 100%);
    --color-accent: hsl(260, 80%, 80%);
    --color-tertiary: hsl(140, 80%, 80%);

}

/* RESET */

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin-block-end: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core body defaults */
body {
  line-height: 1.5;
  overscroll-behavior-y: contain;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

/* Balance text wrapping on headings */
h1, h2,
h3, h4 {
  text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

/* Ensure the button is positioned at the top-right corner */
.dark-mode-toggle {
    background-color: rgba(0, 0, 0, 0.801);
    width: 2em; /* Set the width of the circle */
    height: 2em; /* Set the height to be equal to width */
    border-radius: 50%; /* Makes it a perfect circle */
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center; /* Centers SVG horizontally */
    align-items: center; /* Centers SVG vertically */
    z-index: 1000; /* Ensure the button stays above other content */

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Soft shadow */
}

/* Style for disabled sections */
.d-none {
    display: none !important;
}

/* Style for disabled inputs */
input:disabled, .form-check-input:disabled + .form-check-label {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Center the SVG inside the button */
.darkModeSVG{
    width: 1.5em; /* Adjust size */
    filter: invert(1) brightness(100%);
    height: auto;
    object-fit: contain;
    font-family: serif;
    font-size: 1em;
}

/* Remove number input spinner in all browsers */
.input-no-spinner::-webkit-inner-spin-button,
.input-no-spinner::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


/* GLOBAL */

body {
    font-family: "Pridi", serif;
    font-weight: 300;
    text-align: center;
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

body.dark .darkModeSVG, body.dark .hideSVG, body.dark .showSVG, body.dark .dark-mode-toggle {
    filter: invert(1); /* Invert color for dark mode */
}



.input-no-spinner {
    -moz-appearance: textfield; /* Hide arrows in Firefox */
    appearance: textfield; /* Hide arrows in Chrome */
}
s
h1, h2, h3, b {
    font-weight: 500;
}

li{
    background-color: #00000028;
    border-radius: 4px;
    border: 1px solid #00000045;
}

.selected{
    background-color: #00000049;
    border-radius: 4px;
    border: 1px solid #00000045;
}

hr{
    border: 2px solid #000000;
    border-radius: 2px;
}

/* Hiding elements */

.hide-on-customquiz, .hide-on-examsession, .hide-on-grileselect, #question-count, #materie-filter, #custom-quiz-button, #grileselect{
    transition: all 500ms ease;
}

.fade-out {
    opacity: 0;
}

.fade-in {
    opacity: 1;
}


/* Timer */

.showSVG, .hideSVG {
    height: auto;
    width: 2.2em;
    color: var(--tertiary-color);
}

body.dark .hideSVG, body.dark .showSVG {
    filter: invert(1); /* Invert color for dark mode */
}

.badge{
    background-color: var(--color-accent);
    color: var(--color-primary);
    font-size: 1em;
}

#timer-controls, .grileselect, #materie-filter{
    border: 0.2em solid var(--color-tertiary);
    padding: 1em;
    border-radius: 1em;
}

#timer-display, #timer-text{
    font-weight: 400;
}

#time-up-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-accent);
    color: var(--color-primary);
    font-weight: 600;
    font-size: 2em;
    padding: 20px;
    border-radius: .8em;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.694);
    z-index: 1000;
    text-align: center;
}

#time-up-popup button {
    margin: .2em;
}

#continue-quiz{
    background-color: grey;
    color: white;
    transition: all 0.3s ease-in-out;
    border: none;
}

#countdown-settings {
    display: none; /* Initially hidden */
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

#countdown-minutes, #question-count{
    max-width: 4em;
    text-align: center;
}


/* Start screen */

.start-button,.form-select {
    background-color: var(--color-accent);
    color: var(--color-primary);
    font-weight: 500;
    transition: all 0.3s ease-in-out;
}

.custom-quiz-btn{
    background-color: var(--color-accent);
    color: var(--color-primary);
    border: none;
    font-weight: 400;
    transition: all 0.3s ease-in-out;
}

.start-button:hover, .custom-quiz-btn:hover, .form-select:hover{
    background-color: var(--color-accent);
    color: var(--color-primary);
    filter: hue-rotate(50deg);
}

.form-select{
    border: none;
    padding: 0.5em;
    border-radius: 0.5em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Soft shadow */
}

.custom-quiz-btn-sel, .examsessionbtn{
    filter: hue-rotate(100deg);
}

.toast{
    width: 95%;
}

.titlestartscreen{
    color: var(--color-accent);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); 
}

.start-screen-options{
    max-width: 16.3em;
}

.start-screen-details{
    max-width: 38em;
}

.grileselecttext, .filtrutitlu {
    color: var(--color-accent);
    font-weight: 500;
    opacity: 1;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lawimage{
    max-width: 10em;
    height: auto;
}

.msgtooltip{
    font-size: 0.75em;
}

.form-label, .form-select{
    font-weight: 400;
}


/* Quiz screen */

#see-results-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#all-questions-container {
    max-height: max-content;
    overflow-y: auto;
    padding: 10px;
    border: none;
    border-radius: 5px;
}

.line{
    border: 2px solid var(--color-secondary);
    border-radius: 2px;
    margin-top: 4em;
}

.question-text{
    text-align: left;
    margin: 0.5em 0px;
}
.question-item {
    margin-bottom: 20px;
}

button.disabled-answer {
    pointer-events: none; 
    opacity: 1;
}

.answer-button, .restart-button, #submit-button, #skip-button, #next-button, #see-results-button, #continue-quiz{
    transition: all 0.3s ease-in-out;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: .8em;
}

#submit-button, #skip-button, #next-button, #see-results-button, #continue-quiz, .restart-button{
    font-weight: 500;
}

#question-counter{
    margin-bottom: 0px;
    font-weight: 450;
}

.btn.selected {
    transition: font-size 70ms ease-in-out;
    background-color: #f8ebba;
}

.btn.selected:hover{
    background-color:rgb(216, 204, 161);
    transition: all 300ms ease-out;
}

.correct-border {
    border: 4px solid rgb(56, 143, 56) !important;
    border-radius: .8em;
}

.btn.correct-border{
    transition: all 200ms ease-out;
}

.incorrect {
    border: 4px solid rgb(170, 71, 71) !important;
    border-radius: .8em;
}

.form-control{
    width: 100px;
}


/* Report Button */

.report-btn {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 0.8em;
    cursor: pointer;
    border-radius: 5px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
}

.report-btn:hover {
    background-color: #a33030;
}

/* Pop-up Styling */

.popup-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 90%;
    max-width: 500px;
    animation: fadeIn 0.3s;
}

.close-btn {
    margin-top: 15px;
    background: #333;
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 5px;
}

.close-btn:hover {
    background: #555;
}
.popup-info{
    font-weight: 400;
    font-size: 1em;
}

/* Animation */

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

/* Summary screen */

.scor{
    color: var(--color-tertiary);
}

#quiz-summary ul {
    list-style-type: none;
    padding-left: 0;
}

#summary-container {
    margin-top: 2em;
    
}

#quiz-summary li {
    list-style-type: none; /* Remove the marker */
    margin: 0.5em;
    padding: .5em;
}

.summary-item {
    text-align: left; /* Align text to the left */
    margin-left: 20px; /* Optional: Adds space on the left if needed */
}

.result-title {
    font-size: 2.5em;
    font-weight: 500;
}

.gifpisica{
    border-radius: 4px;
}

.accordion-item{
    background-color: transparent;
    border: none;
}

.accordion-button{
    background-color: hsl(0, 0%, 100%);
    color: var(--color-primary);
    font-weight: 500; 
    transform: scale(1);
    transform-origin: top;
    transition: all 0.3s ease-in-out;
}

.accordion-button.collapsed{
    background-color: hsl(51, 74%, 85%);
    color: hsl(200, 50%, 10%);
    transform: scale(1);
    transform-origin: top;
    transition: all 0.3s ease-in-out;
    max-width: 23em;
}

.accordion-button:not(.collapsed){
    background-color: hsl(51, 74%, 85%);
    color: hsl(200, 50%, 10%);
    font-weight: 500; 
    transform: scale(1);
    transform-origin: top;
    transition: all 0.2s ease-in-out;

}

.accordion-body{
    background-color: hsl(51, 74%, 85%);
    filter: brightness(120%) saturate(60%);
    border-bottom-left-radius: .5em;
    border-bottom-right-radius: .5em;
}

.accordion-collapse {
    transform: scale(0);
    transform-origin: top;
    transition: all 0.2s ease-in;
}

.accordion-collapse.show {
    transform: scale(1);
    transform-origin: top;
    transition: all 0.3s ease-in-out;
}