/* Theme colors */
:root {
    --bg-dark: #1a1a2e;
    --bg-light: #78a2ff;
    --text-dark: #f8f8f8;
    --text-light: #000000;
    --primary: #0051ff;
    --primary-hover: #0400ff;
    --secondary: #ebebeb;
    --link: #008cff;
    --link-light: var(--primary);
    --link-hover: #0051ff;
    --link-hover-light: var(--primary-hover);
    --content-dark: #2b2b3e;
    --content-light: #ffffff;
    --input-bg-dark: #2b2b3e;
    --input-bg-light: #ffffff;
    --shadow-color: #0051ff;
    --toast-bg-dark: #2b2b3e;
    --toast-bg-light: #ffffff;
    --toast-border: var(--primary);
}

/* Light theme override */
body.light-theme {
    --bg: var(--bg-light);
    --text: var(--text-light);
    --content-bg: var(--content-light);
    --input-bg: var(--input-bg-light);
    --toast-bg: var(--toast-bg-light);
    --link: var(--link-light);
    --link-hover: var(--link-hover-light);
} 

/* Dark theme default */
body {
    --bg: var(--bg-dark);
    --text: var(--text-dark);
    --content-bg: var(--content-dark);
    --input-bg: var(--input-bg-dark);
    --toast-bg: var(--toast-bg-dark);

    font-family: "Bruno Ace SC", sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Navigation Bar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary);
    padding: 1.95vh 3vh;
    margin-bottom: 6.5vh;
}

nav img {
    border-radius: 15%;
    width: 7vh;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 3vh;
    font-size: 1.5rem;
}

nav ul li a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-hover);
}

.logo_name {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    justify-items: center;
    justify-content: center;
    text-decoration: none;
}

.logo_name > div {
    margin-left: 1vw;
    font-size: 2.2rem;
    align-content: center;
    text-align: center;
    color: var(--text);
}

/* Keep navbar and footer using dark-theme colors */
nav {
  background-color: var(--primary);
}
nav ul li a,
.logo_name > div {
  color: var(--text-dark);
}
nav ul li a:hover {
  color: var(--primary-hover);
}

/* Footer Bar */
.footer {
    background-color: var(--primary);
    color: var(--text);
    padding: 4vh;
    margin-top: 6.5vh;
    bottom: 0;
    left: 0;
}

.footer_content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 3vh;
}

.footer_section {
    flex: 1 1 200px;
}

.footer_section h3,
.footer_section h4 {
    margin-bottom: 1.95vh;
    font-size: 1.7rem;
    color: var(--text);
}

.footer_section p {
    font-size: 0.7rem;
    color: var(--text);
}

.footer_section ul {
    list-style: none;
    padding: 0;
}

.footer_section ul li {
    margin-bottom: 0.95vh;
}

.footer_section ul li a {
    text-decoration: none;
    color: var(--secondary);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.footer_section ul li a:hover {
    color: var(--primary-hover);
}

.footer_desc_a {
    text-decoration: none;
    color: var(--text);
    transition: color 0.3s ease;
}

.footer_desc_a:hover {
    color: var(--primary-hover);
}


.footer {
  background-color: var(--primary);
  color: var(--text-dark);
}
.footer_desc_a,
.footer_section h3,
.footer_section h4,
.footer_section p {
  color: var(--text-dark);
}
.footer_section ul li a {
  color: var(--secondary);
}
.footer_section ul li a:hover,
.footer_desc_a:hover {
  color: var(--primary-hover);
}

/* General CSS */
.copyright {
    font-family: Arial, Helvetica, sans-serif;
}

.bold {
    font-weight: bold;
}

h1, h2, h3, h4 {
    font-family: "Bruno Ace SC", sans-serif;
    color: var(--text);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }

.flex { display: flex; }
.wrap { flex-wrap: wrap; }
.stretch { align-items: stretch; }
.column { flex-direction: column; }
.row { flex-direction: row; }
.flex_start { justify-content: flex-start; align-items: flex-start; }
.flex_center { justify-content: center; align-items: center; }
.flex_space { justify-content: space-between; align-items: center; }

.text_field {
    font-family: "Smooch Sans", sans-serif;
    font-size: 1.7rem;
    font-weight: 500;
    color: var(--text);
}

.margin_top { margin-top: 7vh; }
.small_margin_top { margin-top: 2vh; }
.margin_bottom { margin-bottom: 5vh; }
.small_margin_bottom { margin-bottom: 1.5vh; }
.margin_left { margin-left: 4vw; }
.small_margin_left { margin-left: 1.5vw; }

/* Project Links */
.project_links {
    display: flex;
    align-items: stretch;
    gap: 3vw;
}

.project_links > a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--link);
    text-decoration: none;
    box-shadow: 0 0 10px 5px var(--shadow-color);
    border-radius: 1vh;
    width: 10vw;
    padding: 0.7vw;
    transition: color 0.3s ease;
    overflow: hidden;
}

.project_links > a:hover {
    color: var(--link-hover);
}

/* Textarea */
textarea {
    background-color: var(--input-bg);
    color: var(--text);
    box-shadow: 0 0 5px 1px var(--shadow-color);
    border-radius: 1vh;
    min-height: 10vh;
    width: 40vw;
    resize: vertical;
    outline: none;
    padding: 1vw;
}

/* Containers & Content */
.container {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.content {
    font-size: 1.7rem;
    border-radius: 50px;
    background-color: var(--content-bg);
    color: var(--text);
    width: 75vw;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    font-family: "Smooch Sans", sans-serif;
    text-align: center;
    padding: 8vh 4vw;
    box-shadow: 0 0 50px 10px var(--shadow-color);
}

/* Wrapper */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* SCP Container */
.scp00_container {
    font-size: 1.7rem;
    border-radius: 50px;
    background-color: var(--content-bg);
    color: var(--text);
    width: 75vw;
    font-family: "Smooch Sans", sans-serif;
    padding: 8vh 4vw;
    box-shadow: 0 0 50px 10px var(--shadow-color);
}

.scp00_container > a,
.scp00_container > p > a,
.scp00_container > ul > li > ul > li > a,
.scp00_container > ul > li > a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.3s ease;
}

.scp00_container > a:hover,
.scp00_container > p > a:hover,
.scp00_container > ul > li > a:hover,
.scp00_container > ul > li > ul > li > a:hover {
    color: var(--link-hover);
}

.scp00_container > ul {
    list-style-type: disc;
    margin-left: 1.5em;
    padding-left: 0.5em;
}

.scp00_container > ul > li > ul {
    list-style-type: circle;
    margin-left: 1.5em;
}

/* Icons & Status */
.bx-copy-alt {
    transition: color 0.3s ease;
}

.bx-copy-alt:hover {
    cursor: pointer;
    color: var(--secondary);
}

.success {
    color: #0d9e00;
}

.error {
    color: #9e0000;
}

/* User Infos */
#user_infos {
    display: flex;
    justify-content: space-evenly;
    width: 60vw;
    height: 25vh;
    border-radius: 1vw;
}

#user_infos > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.75);
    width: 20vw;
    color: var(--text);
    font-size: 1.2rem;
}

.left_border_radius {
    border-top-left-radius: 1vw;
    border-bottom-left-radius: 1vw;
}

.right_border_radius {
    border-top-right-radius: 1vw;
    border-bottom-right-radius: 1vw;
}

/* Circle */
.circle {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #36393e;
    height: 2vw;
    width: 2vw;
    color: var(--text);
}

/* Icon */
.icon {
    border-radius: 50%;
    height: 120px;
    width: 120px;
    margin: 0 auto;
    box-shadow: 0 0 5px 2px var(--shadow-color);
}

/* Guilds */
.guilds-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
}

.guilds {
    width: 15vw;
    margin: 1vh;
    padding: 1vw;
    text-align: center;
    line-height: 1.2rem;
    font-size: 1.4rem;
    background-color: rgba(24, 25, 27, 0.5);
    border-radius: 1vh;
    box-sizing: border-box;
    color: var(--text);
}

/* Misc */
colore {
    color: #970000;
    font-weight: bold;
}

.italic {
    font-style: italic;
}

#autore {
    color: var(--link);
    transition: color 0.3s ease;
}

#autore:hover {
    color: var(--link-hover);
    cursor: pointer;
}

/* Popup Toast */
.popup-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: var(--toast-bg);
    color: var(--text);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    align-items: center;
    gap: 2vw;
    font-family: sans-serif;
    z-index: 1000;
    max-width: 370px;
    border-left: 5px solid var(--toast-border);
}

.popup-toast a {
    color: var(--link);
    text-decoration: underline;
}

.popup-close {
    margin-left: auto;
    cursor: pointer;
    font-weight: bold;
    color: var(--text);
}

/* Container Div */
.containerDiv {
    background-color: var(--content-bg);
    color: var(--text);
    height: 70vh;
    width: 70vw;
    border: 5px solid var(--primary);
    margin-top: 5vh;
    display: flex;
    justify-content: start;
    align-items: start;
    border-radius: 1vw;
}

.containerDiv > h2 {
    align-self: center;
}

/* Game Buttons */
.game_button {
    background-color: var(--primary);
    border: none;
    width: 40px;
    height: 40px;
    outline: none;
    position: absolute;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
}

.game_button_clicked,
.game_button_start_game {
    margin-top: 20px;
}

/* Inputs */
button,
input {
    font-family: "Smooch Sans", sans-serif;
    font-size: 1.7rem;
    text-align: center;
    background: var(--input-bg);
    color: var(--text);
    width: 30%;
    height: 5%;
    border: 1px solid var(--primary);
    border-radius: 1vw;
    padding: 1vh;
    appearance: none;
    outline: none;
}

button:disabled {
  font-family: "Smooch Sans", sans-serif;
  font-size: 1.7rem;
  text-align: center;
  background: var(--input-bg);
  color: var(--text-muted); /* usa un colore testo attenuato per il disabilitato */
  width: 30%;
  height: 5%;
  border: 1px solid var(--primary-light); /* bordo più chiaro per indicare disabilitazione */
  border-radius: 1vw;
  padding: 1vh;
  appearance: none;
  outline: none;
  opacity: 0.6;           /* attenua l’opacità per evidenziare lo stato disabilitato */
  cursor: not-allowed;    /* cursore che indica non cliccabile */
}  

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    appearance: textfield;
}

.theme-toggle {
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}
.theme-toggle input {
  display: none;
}

/* contenitore etichetta */
.theme-toggle label {
  display: flex;
  align-items: center;
  width: 60px;
  height: 30px;
  background: var(--secondary);
  border-radius: 30px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
  padding: 0 5px;
  box-sizing: border-box;
}

/* icone */
.theme-toggle label .bx {
  font-size: 1.2rem;
  color: var(--text);
  transition: color 0.3s;
}
.theme-toggle label .bx-moon {
  margin-right: auto;
}
.theme-toggle label .bx-sun {
  margin-left: auto;
}

/* pallina */
.theme-toggle .slider-ball {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: var(--content-bg);
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 0 5px var(--shadow-color);
}

/* stato checked */
.theme-toggle input:checked + label {
  background: var(--primary);
}
.theme-toggle input:checked + label .bx-moon {
  color: var(--secondary);
}
.theme-toggle input:checked + label .bx-sun {
  color: var(--text);
}
.theme-toggle input:checked + label .slider-ball {
  transform: translateX(30px);
}

.genera_qrcode {
  background-color: #242424;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
}


/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 2vh;
    }
    nav ul {
        flex-direction: column;
        width: 100%;
        margin-top: 1.95vh;
    }
    .footer {
        margin-top: 2vh;
    }
    .footer_content {
        flex-direction: column;
        text-align: center;
    }
    .footer_section {
        flex: 1 1 50px;
    }
    .content {
        width: 95vw;
    }
    .logo_name > div {
        font-size: 1.8rem;
    }
    .project_links {
        flex-direction: column;
    }
    textarea,
    .project_links > a {
        width: 85vw;
    }
    #user_infos {
        flex-direction: column;
        width: 80vw;
        height: 90vh;
        border-radius: 1vh;
    }
    #user_infos > div {
        width: 80vw;
        height: 30vh;
    }
    .left_border_radius,
    .right_border_radius {
        border-radius: 1vw;
    }
    .guilds-container {
        flex-direction: column;
    }
    .guilds {
        width: 75vw;
        padding: 1vh;
    }
    .circle {
        height: 5vh;
        width: 5vh;
    }
    .popup-toast {
        max-width: 90vw;
    }
}

.reset_style {
  all: revert;
}