/* ===========================
   Reset & Base Styles
   =========================== */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #1a1a1a;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('/d9fd3fd7.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

pre {
    font-size: 24px;
    color: blue;
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    max-width: 500px;
    overflow-wrap: break-word;
    margin: auto;
}

/* ===========================
   Layout Containers
   =========================== */
.container {
    display: flex;
    flex-direction: column;
    height: 95%;
    width:  95%;
    max-width: 600px;
    padding: 20px 0 0;
    background-color: rgba(43, 43, 43, 0.6);
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.form-container {
    display: flex;
    margin-top: auto;
    gap: 0px;
}

.message-box {
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    color: white;
    font-family: 'Courier New', Courier, monospace;
    text-align: left;

    scrollbar-width: thin;
    scrollbar-color: rgba(52, 152, 219, 0.5) transparent;
}

.message-box::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.message-box::-webkit-scrollbar-track {
    background: transparent;
}

.message-box::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.5);
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

/* ===========================
   Typography
   =========================== */
h1 {
    font-size: 2rem;
    margin: 0 0 20px;
    color: #3498db;
}

p {
    font-size: 1.2rem;
    margin: 0 0 10px;
    color: whitesmoke;
    font-family: 'Courier New', Courier, monospace;
}

.message {
    max-width: 70%;
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: 20px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    display: inline-block;
    clear: both;
}

/* Messages from other users */
.message-other {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-top-left-radius: 0;
    float: left;
}

/* Messages sent by you */
.message-self {
    background-color: #3498db;
    color: white;
    border-top-right-radius: 0;
    float: right;
}

/* Local messages */
.message-local {
    background-color: rgba(52, 152, 219, 0.5);
    color: white;
    border-top-right-radius: 0;
    float: right;
    font-style: italic;
    font-weight: 600;
    text-decoration-color: rgba(255, 255, 255, 0.5);
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
    transition: box-shadow 0.3s ease;
}

.user-count {
    font-size: 1.5rem;
    color: #3498db;
    margin-bottom: 5px;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
}

/* ===========================
   Inputs & Buttons
   =========================== */
.input-box {
    flex: 1;
    padding: 15px;
    font-size: 1rem;
    border-radius: 10px 0px 0px 10px;
    border: 1px solid #555;
    background-color: #2c2c2c;
    color: #fff;
    outline: none;
    transition: border-color 0.3s;
}

.input-box:focus {
    border-color: #3498db;
}

.form-button {
    padding: 10px 15px;
    font-size: 1rem;
    border-radius: 0 10px 10px 0;
    background-color: #3498db;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.form-button:hover {
    background-color: #2980b9;
}

/* ===========================
   Footer
   =========================== */
.footer-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    text-align: center;
    padding: 5px 0;
    font-family: Arial, sans-serif;
    user-select: none;
    z-index: 9999;
}

.credit-link {
    color: rgba(170, 187, 221, 0.6);
}

  #version-info {
    position: fixed;
    top: 5px;
    right: 5px;
    font-size: 10px;
    color: #888;
    cursor: default;
    user-select: none;
    opacity: 0.2;
    transition: opacity 0.3s ease;
  }
  #version-info:hover {
    opacity: 1;
    color: #444;
  }

/* ===========================
   Notification
   =========================== */
#notification {
    position: fixed;
    top: 50%;
    left: 50%;
    max-width: 50vw;
    width: auto;       
    transform: translate(-50%, -50%);
    background: rgba(52, 152, 219, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    z-index: 10000;
    text-align: center;


    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#notification.show {
    opacity: 1;
    pointer-events: auto;
}
