/* ==========================================================
   Global Chat Box — Orange/White Sharp-Edge style
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700&family=Montserrat:wght@600;700&family=Open+Sans:wght@400;600&display=swap');

#gc-app {
    /* ---- Clean white background ---- */
    --gc-bg-1: #ffffff;
    --gc-bg-2: #f6f6f6;

    /* ---- Orange + white + charcoal accents ---- */
    --gc-accent-1: #ff5e00;   /* deep orange */
    --gc-accent-2: #ff8a3d;   /* lighter orange */
    --gc-accent-3: #ffb347;   /* orange highlight */
    --gc-dark: #1c1c1c;       /* charcoal, the "matching other color" */

    --gc-text: #1c1c1c;
    --gc-text-dim: #7a7a7a;

    --gc-bubble-me: linear-gradient(135deg, var(--gc-accent-1) 0%, var(--gc-accent-2) 100%);
    --gc-bubble-other: #f0f0f0;

    --gc-glass: #ffffff;
    --gc-glass-border: #e6e6e6;
    --gc-radius: 6px;

    /* ---- Typography ---- */
    --gc-font-body: 'Inter', 'Roboto', 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --gc-font-heading: 'Poppins', 'Montserrat', 'Inter', sans-serif;

    position: fixed;
    inset: 0;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    max-width: none;
    max-height: none;
    border-radius: 0;
    overflow: hidden;
    z-index: 999999;
    font-family: var(--gc-font-body);
    background: linear-gradient(180deg, var(--gc-bg-1), var(--gc-bg-2));
    color: var(--gc-text);
    border-top: 4px solid var(--gc-accent-1);
    touch-action: pan-y;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overscroll-behavior: contain;
}

#gc-app * { box-sizing: border-box; touch-action: manipulation; }

html:has(#gc-app), body:has(#gc-app) {
    overflow: hidden;
    height: 100%;
    margin: 0;
    padding: 0;
}

/* ---------- SHARP SOLID ICON (shared) ---------- */
.gc-icon-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--gc-accent-1), var(--gc-accent-2));
    box-shadow: 0 4px 10px -4px rgba(255, 94, 0, 0.55);
}
.gc-icon-glass svg { display: block; }

.gc-icon-glass-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #f5f5f5;
    border: 1px solid var(--gc-glass-border);
}

/* ---------- AUTH SCREEN ---------- */
.gc-auth-screen {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.gc-auth-card {
    width: 100%;
    background: var(--gc-glass);
    border: 1px solid var(--gc-glass-border);
    border-radius: 8px;
    padding: 28px 24px;
    box-shadow: 0 10px 30px -14px rgba(28,28,28,0.18);
}

.gc-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    font-family: var(--gc-font-heading);
    font-size: 21px;
    font-weight: 700;
    margin: 0 0 20px;
    letter-spacing: 0.2px;
}
.gc-brand-text {
    color: var(--gc-dark);
}
.gc-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 5px;
    flex-shrink: 0;
}
.gc-brand-icon svg { width: 18px; height: 18px; }

.gc-tabs {
    display: flex;
    background: #f2f2f2;
    border-radius: 5px;
    padding: 4px;
    margin-bottom: 18px;
    border: 1px solid var(--gc-glass-border);
}

.gc-tab {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--gc-text-dim);
    padding: 10px 0;
    border-radius: 3px;
    font-family: var(--gc-font-body);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gc-tab.active {
    background: linear-gradient(135deg, var(--gc-accent-1), var(--gc-accent-2));
    color: #ffffff;
    box-shadow: 0 4px 10px -4px rgba(255,94,0,0.55);
}

.gc-form {
    display: none;
    flex-direction: column;
    gap: 12px;
}
.gc-form.active { display: flex; }

.gc-form input[type="text"],
.gc-form input[type="password"] {
    width: 100%;
    padding: 13px 16px;
    border-radius: 5px;
    border: 1px solid var(--gc-glass-border);
    background: #fafafa;
    color: var(--gc-text);
    font-family: var(--gc-font-body);
    font-size: 14px;
    outline: none;
    transition: border 0.2s ease, background 0.2s ease;
}
.gc-form input:focus {
    border-color: var(--gc-accent-1);
    background: #ffffff;
}
.gc-form input::placeholder { color: var(--gc-text-dim); }

.gc-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 1px dashed var(--gc-glass-border);
    border-radius: 5px;
    color: var(--gc-text-dim);
    font-family: var(--gc-font-body);
    font-size: 13px;
    cursor: pointer;
    transition: border 0.2s ease, color 0.2s ease;
}
.gc-file-label:hover { border-color: var(--gc-accent-1); color: var(--gc-text); }
.gc-file-label input[type="file"] { display: none; }

.gc-camera-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    flex-shrink: 0;
}
.gc-camera-icon svg { width: 12px; height: 12px; }

.gc-avatar-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    border: 2px solid var(--gc-accent-1);
    box-shadow: 0 0 0 4px rgba(255,94,0,0.12);
}

.gc-btn-primary {
    margin-top: 4px;
    padding: 13px 0;
    border: none;
    border-radius: 5px;
    background: linear-gradient(135deg, var(--gc-accent-1), var(--gc-accent-2));
    color: #ffffff;
    font-family: var(--gc-font-body);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    letter-spacing: 0.2px;
    box-shadow: 0 8px 18px -8px rgba(255,94,0,0.55);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gc-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(255,94,0,0.65); }
.gc-btn-primary:active { transform: translateY(0); }

.gc-error {
    color: #e2412a;
    font-family: var(--gc-font-body);
    font-size: 12.5px;
    min-height: 16px;
    margin: 2px 0 0;
    text-align: center;
}

/* ---------- CHAT SCREEN ---------- */
.gc-chat-screen {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: var(--gc-dark);
    border-bottom: 1px solid var(--gc-accent-1);
}

.gc-header-left { display: flex; align-items: center; gap: 8px; }
.gc-header-titles { display: flex; flex-direction: column; line-height: 1.2; }
.gc-header-left h3 { margin: 0; font-family: var(--gc-font-heading); font-size: 15px; font-weight: 600; color: #ffffff; }
.gc-online-count {
    font-family: var(--gc-font-body);
    font-size: 11px;
    font-weight: 600;
    color: var(--gc-accent-2);
}

.gc-live-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--gc-accent-2);
    box-shadow: 0 0 0 0 rgba(255,138,61,0.6);
    animation: gc-pulse 1.6s infinite;
}
@keyframes gc-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255,138,61,0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(255,138,61,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,138,61,0); }
}

.gc-header-right { display: flex; align-items: center; gap: 8px; }
.gc-my-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    object-fit: cover; border: 1.5px solid var(--gc-accent-1);
}
#gc-my-name { font-family: var(--gc-font-body); font-size: 13px; color: #d9d9d9; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.gc-logout-btn {
    border: none;
    width: 30px; height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    background: rgba(255,255,255,0.08);
    transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.gc-logout-btn svg { width: 14px; height: 14px; }
.gc-logout-btn svg path { stroke: #d9d9d9; transition: stroke 0.2s ease; }
.gc-logout-btn:hover { transform: translateY(-1px); background: var(--gc-accent-1); }
.gc-logout-btn:hover svg path { stroke: #ffffff; }

/* ---------- MESSAGES ---------- */
.gc-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
    background: var(--gc-bg-1);
}
.gc-messages::-webkit-scrollbar { width: 5px; }
.gc-messages::-webkit-scrollbar-thumb { background: var(--gc-accent-3); border-radius: 4px; }

.gc-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 82%;
    animation: gc-msg-in 0.28s ease;
}
@keyframes gc-msg-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.gc-msg-row.me { align-self: flex-end; flex-direction: row-reverse; }
.gc-msg-row.other { align-self: flex-start; }

.gc-msg-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
}

.gc-msg-bubble-wrap { display: flex; flex-direction: column; gap: 2px; }
.gc-msg-name {
    font-family: var(--gc-font-body);
    font-size: 11px;
    color: var(--gc-text-dim);
    padding: 0 4px;
}
.gc-msg-row.me .gc-msg-name { text-align: right; }

.gc-msg-bubble {
    padding: 10px 14px;
    border-radius: 4px;
    font-family: var(--gc-font-body);
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap;
}
.gc-msg-row.me .gc-msg-bubble {
    background: var(--gc-bubble-me);
    color: #ffffff;
    border-bottom-right-radius: 0;
    box-shadow: 0 6px 14px -6px rgba(255,94,0,0.45);
}
.gc-msg-row.other .gc-msg-bubble {
    background: var(--gc-bubble-other);
    border: 1px solid var(--gc-glass-border);
    color: var(--gc-text);
    border-bottom-left-radius: 0;
}

.gc-msg-time {
    font-family: var(--gc-font-body);
    font-size: 10px;
    color: var(--gc-text-dim);
    padding: 0 4px;
}
.gc-msg-row.me .gc-msg-time { text-align: right; }

/* ---------- TYPING INDICATOR ---------- */
.gc-typing-indicator {
    padding: 2px 20px 6px;
    font-family: var(--gc-font-body);
    font-size: 12px;
    font-style: italic;
    color: var(--gc-text-dim);
    min-height: 16px;
    background: var(--gc-bg-1);
}

/* ---------- INPUT BAR ---------- */
.gc-input-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #ffffff;
    border-top: 1px solid var(--gc-glass-border);
}

#gc-message-input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 5px;
    border: 1px solid var(--gc-glass-border);
    background: #fafafa;
    color: var(--gc-text);
    font-family: var(--gc-font-body);
    font-size: 14px;
    outline: none;
}
#gc-message-input:focus { border-color: var(--gc-accent-1); background: #ffffff; }

.gc-send-btn {
    width: 42px; height: 42px;
    border-radius: 5px;
    border: none;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gc-send-btn svg { width: 17px; height: 17px; margin-left: -1px; }
.gc-send-btn:hover { transform: scale(1.05) translateY(-1px); box-shadow: 0 10px 20px -6px rgba(255,94,0,0.6); }
.gc-send-btn:active { transform: scale(0.96); }
.gc-send-btn:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }

/* ---------- Always full-screen app frame, on every device ---------- */
