body {
    margin: 0;
    background-color: #111;
    color: #ccc;
    font-family: sans-serif, Arial;
}

.navbar {
    background-color: #111;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    z-index: 1000;
    font-weight: bold;
}

.nav-items a {
    color: #aaa;
    margin-right: 1.5rem;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-items a:hover {
    color: #eee;
}

.nav-items a.active {
    color: #eee;
}

.logo-container {
    perspective: 1000px;
    width: 60px;
    height: 60px;
    position: relative;
}

.logo {
    color: #aaa;
    font-weight: bold;
    height: 40px;
    margin-right: 1rem;
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    transition: transform 0.6s ease;
}

.logo.front {
    z-index: 2;
}

.logo.back {
    transform: rotateY(180deg);
}

.logo-container:hover .front {
    transform: rotateY(180deg);
}

.logo-container:hover .back {
    transform: rotateY(360deg);
}

.mode-icon {
    position: relative;
    display: inline-block;
    height: 20px;
    margin-right: 5px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    margin-right: 50px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: 0.4s;
    border-radius: 20px;
}

.slider::before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #aaa;
}

input:checked + .slider::before {
    transform: translateX(20px);
}

.content {
    margin-top: 80px; /* spacing to avoid overlap with fixed navbar */
    padding: 2rem;
}

footer {
    text-align: center;
    padding: 1rem;
    color: #aaa;
    font-weight: bold;
}

input {
    flex: 1;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    font-weight: bold;
    background-color: #ccc;
    color: #222;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    font-weight: bold;
    background-color: #249;
    color: #ccc;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #24b;
    transform: translateY(-2px);
}

button:active {
    background-color: #249;
    transform: translateY(0);
}

.mode-popup-overlay{
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.mode-popup{
    background: #222;
    width: 40%;
    height: 40%;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(100,100,100,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.shake {
    animation: shake 0.4s;
}

@keyframes shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(10px); }
    100% { transform: translateX(0); }
}

.login-container {
    box-shadow: 0 0 15px rgba(50,50,50,0.7);
    width: 60%;
    margin: 30px auto;
    border-radius: 15px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.login-window {
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-label{
    color: #aaa;
    margin-right: 1.5rem;
    text-decoration: none;
    font-weight: bold;
}

.alert {
    padding: 0.2rem 1.2rem;
    font-size: 1rem;
    font-weight: bold;
    background-color: #ccc;
    color: #222;
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.alert,
.alert > .alert__message {
  background-color: #06f;
}

.alert.alert--error,
.alert.alert--error > .alert__message {
  background-color: #f55;
}

.alert.alert--success,
.alert.alert--success > .alert__message {
  background-color: #5fa;
}

.alert > .alert__close {
  background: transparent;
  cursor: pointer;
  border: none;
  outline: transparent;
  font-size: 2rem;
}

.alert > .alert__close:hover {
  opacity: 0.85;
}

.chat-container {
    box-shadow: 0 0 15px rgba(50,50,50,0.7);
    width: 60%;
    margin: 30px auto;
    border-radius: 15px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-window {
    height: 500px;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 12px;
    border-radius: 10px;
    line-height: 1.4;
}

.message.user {
    align-self: flex-end;
    background-color: #24b;
    color: #ccc;
}

.message.bot {
    align-self: flex-start;
    background-color: #222;
    color: #ccc;
}

.chat-form {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 10px;
    border-top: 1px solid #333;
}
