html {
    height: 100%;
    overflow: hidden;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: white;
    color: #111;
    overflow: hidden;
}

/* HEADER */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: white;
    padding: 6px 12px;
    text-align: center;
    z-index: 1000;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid #eee;
}

/* TOP BAR */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 28px;
	margin-bottom: 4px;
}

/* ONLINE BAR */
.online-bar {
    font-size: 13px;
    text-align: center;
    padding-bottom: 5px;
}

/* REPORT BUTTON */
.report-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    width: 58px;      /* adjust */
    height: 40px;     /* adjust */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-left: -4px;   /* adjust: -4px, -8px, -12px */
    cursor: pointer;
    overflow: visible;
}

/* REPORT MENU */
.report-menu {
	position: absolute;
    top: 45px;
    left: 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 14px;
    padding: 12px;
    display: none;
    flex-direction: column;
    gap: 10px;
    min-width: 180px;
    box-shadow:
    0 4px 12px rgba(0,0,0,0.12);
    z-index: 4000;
}

.report-menu select {
    border-radius: 10px;
    padding: 6px;
    border: 1px solid #ccc;
}

.report-icon {
    width: 25px;      /* adjust to taste */
    height: 25px;
    display: block;
}

/* ONLINE COUNT */
.online-bar{
    display:flex;
    align-items:center;
    gap:4px;
    font-size:13px;
}

.online-icon{
    height:25px;   /* adjust as needed */
    width:25px;
    display:block;
}


/* LOGO */
.logo {
    width: 90px;
    max-width: 25vw;
    height: auto;
}
.header-logo {
    height: 39px;   /* same visual height as user icon */
    width: auto;
    object-fit: contain;
    display: block;
    opacity: 0.95;
    user-select: none;
    pointer-events: none;
}

/* CHAT */
#chat {
    display: flex;
    flex-direction: column;
    height: 100dvh;
}

/* CHAT BOX */
.chat-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px;
    overflow-y: auto;
    margin-top: 48px;
    margin-bottom: 80px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* MESSAGES CONTAINER */
.messages {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100%;
}

.chat-box::before {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    background-image: url("images/kozkozer-watermark.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
   opacity: var(--logo-opacity, 0.07);
transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}
/* MESSAGES */
.message {
    display: inline-block;
    width: fit-content;
    max-width: 85%;

    padding: 10px 12px;
    margin: 6px 0;
    border-radius: 16px;

    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;

    font-size: 15px;
    line-height: 1.4;

    position: relative;
    z-index: 2;
}
.you {
    background: #cce5ff;
    margin-left: auto;
}

.stranger {
    background: #ffd6e7;
	margin-right: auto;
}

.typing-bubble{
    background:#ffd6e7;
    padding:10px 14px;
    margin:6px 0;
    border-radius:16px;
    width:fit-content;
    align-self:flex-start;
}

.typing-bubble span{
    display:inline-block;
    width:7px;
    height:7px;
    margin:0 2px;
    border-radius:50%;
    background:#666;
    animation:typing 1.2s infinite ease-in-out;
}

.typing-bubble span:nth-child(2){
    animation-delay:.2s;
}

.typing-bubble span:nth-child(3){
    animation-delay:.4s;
}

@keyframes typing{
    0%,60%,100%{
        transform:translateY(0);
        opacity:.35;
    }

    30%{
        transform:translateY(-5px);
        opacity:1;
    }
}

/* INPUT AREA */
.input-area {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 10px;
    background: white;
    box-sizing: border-box;
    border-top: 1px solid #eee;
}

/* TEXTAREA */
textarea {
    flex: 1;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid #ccc;
    resize: none;
    overflow-y: auto;
    font-size: 16px;
    line-height: 1.4;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 400;
    max-height: 120px;
    min-height: 45px;
    box-sizing: border-box;
}

textarea {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

textarea::placeholder {
    color: #888;
    font-weight: 500;
}

textarea::-webkit-scrollbar {
    display: none;
}

textarea:disabled {
    background: #f5f5f5;
    color: #888;
}

/* BUTTONS */
button {
    padding: 12px 16px;
    min-width: 70px;
    min-height: 45px;
    border: none;
    background: #4A90E2;
    color: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
	
	
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button:active {
    transform: scale(0.98);
}

/* Modern Buttons */
.action-btn {
    background: linear-gradient(180deg, #5aa7ff 0%, #4A90E2 100%);
    color: white;
    border: none;
    border-radius: 20px; /* Matches textarea */
    font-weight: 600;
    letter-spacing: .2px;

    box-shadow:
        0 3px 6px rgba(0,0,0,.12),
        0 8px 20px rgba(74,144,226,.28),
        inset 0 1px 0 rgba(255,255,255,.35);

    transition: none;
}

.action-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.action-btn:disabled {
    opacity: .45;
    box-shadow: none;
}

/* STATUS */
.status {
    font-size: 12px;
    font-weight: normal;
    text-align: center;
}

/* OVERLAY */
.overlay-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: #555;
    background: rgba(255,255,255,0.95);
    padding: 12px 18px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 2000;
}

/* LOGO AREA */
.logo-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 600px) {
    header {
        min-height: auto;
        padding: 6px 12px;
        justify-content: flex-start;
    }

    .top-bar {
        margin-bottom: 2px;
    }
}

.logo-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

  .status {
    font-size: 12px;
    font-weight: normal;
    text-align: center;
}

  .chat-box::before {
        width: 250px;
        height: 250px;
    }
    button {
        padding: 10px 14px;
        min-width: 60px;
    }

    textarea {
        font-size: 16px;
    }
}