/* =========================================================
   G-CHAT PAGE STYLESHEET
   ========================================================= */

body.gchat-page {
    background-color: #000435;
    color: #d9d9d9;
}

.gchat-back-link {
    display: inline-block;
    margin: 15px 3px 0;
    color: #FFB733;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

.gchat-back-link:hover {
    color: #fff;
}

.gchat-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 20px 20px 10px;
    flex-wrap: wrap;
}

.gchat-hero-text {
    text-align: center;
    flex-shrink: 0;
}

.gchat-hero-rooms {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-left: 60px;
}
.gchat-hero h1 {
    color: #fff;
    font-size: 30px;
    margin-bottom: 4px;
}

.gchat-hero p {
    color: #c9d6e8;
    font-size: 14px;
}

.gchat-hero-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.gchat-hero-row p {
    margin: 0;
}

/* Left-aligned camera preview block */
.gchat-side-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 0 3px 15px;
}

.gchat-demo-toggle {
    display: flex;
    gap: 8px;
}

.gchat-tier-btn {
    background: linear-gradient(145deg, #7f7f7f, #4a4a4a, #2d2d2d);
    color: white;
    width: 40px;
    height: 40px;
    font-size: 18px;
    border: 2px solid #c0c0c0;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset 1px 1px 3px rgba(255,255,255,0.35),
        inset -1px -1px 3px rgba(0,0,0,0.5),
        0 4px 10px rgba(0,0,0,0.45);
    transition: all 0.2s ease;
}

.gchat-tier-btn.active {
    background: linear-gradient(145deg, #8a7fe0, #6c5ce7, #4a3fb0);
    border-color: #e8e8ff;
}

/* Main 3-column layout */
.gchat-grid {
    display: grid;
    grid-template-columns: 240px 1fr 280px;
    gap: 15px;
    margin: 0 3px 20px;
    align-items: start;
}

.gchat-panel {
    position: relative;
    background: #0d1440;
    border-radius: 15px;
    padding: 14px;
}

/* Combined metallic + chasing light, reused pattern */
.gchat-glow {
    position: relative;
}

.gchat-glow::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 18px;
    padding: 5px;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        #ffffff 12deg,
        #cfcfcf 25deg,
        #FFB733 40deg,
        #A0522D 55deg,
        transparent 80deg,
        transparent 360deg
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: gchat-chase 4s linear infinite;
    pointer-events: none;
}

@keyframes gchat-chase {
    to { transform: rotate(360deg); }
}

/* ===== Friends/Members List (left) ===== */
.gchat-panel-title {
    font-weight: bold;
    color: #fff;
    font-size: 14px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding-bottom: 8px;
}

.gchat-friend {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-radius: 10px;
    margin-bottom: 4px;
}

.gchat-friend:hover {
    background: rgba(255,255,255,0.05);
}

.gchat-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(145deg, #7d7d7d, #444);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    position: relative;
}

.gchat-online-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #69BE28;
    border: 2px solid #0d1440;
}

.gchat-friend-name {
    flex-grow: 1;
    font-size: 13px;
    color: #e8e8e8;
}

.gchat-poke-btn {
    background: #555;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    cursor: pointer;
}

.gchat-poke-btn:hover {
    background: #6c5ce7;
}

.gchat-poke-btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
}

.gchat-status-icon {
    font-size: 13px;
    margin-right: 2px;
}

.gchat-status-icon.open {
    color: #69BE28;
}

.gchat-status-icon.locked {
    color: #FFB733;
}

.gchat-friend-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.gchat-request-btn {
    background: #8a6d1f;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 11px;
    padding: 4px 8px;
    cursor: pointer;
    white-space: nowrap;
}

.gchat-request-btn:hover {
    background: #FFB733;
    color: #222;
}

.gchat-request-btn.requested {
    background: #444;
    cursor: default;
}

.gchat-sublist-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8a95b0;
    margin: 14px 0 6px;
}

.gchat-sublist-title:first-of-type {
    margin-top: 0;
}

.gchat-friend.no-video .gchat-friend-name {
    color: #9aa4bd;
}

.gchat-right-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gchat-room-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
}

.gchat-room-name {
    font-size: 12px;
    color: #e8e8e8;
    font-weight: bold;
}

.gchat-room-sub {
    font-size: 10px;
    color: #8a95b0;
    display: block;
}

.gchat-room-viewers {
    font-size: 11px;
    color: #FFB733;
    font-weight: bold;
    white-space: nowrap;
}

.gchat-friend-name {
    cursor: pointer;
}

.gchat-friend-name:hover {
    text-decoration: underline;
    color: #fff;
}

.gchat-profile-modal-box {
    max-width: 480px;
    text-align: left;
}

.gchat-profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.gchat-avatar-lg {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(145deg, #7d7d7d, #444);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.gchat-profile-header h3 {
    margin: 0 0 4px;
}

.gchat-profile-status {
    font-size: 12px;
    color: #c9d6e8;
}

.gchat-profile-section {
    margin-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 12px;
}

.gchat-profile-section .gchat-panel-title {
    margin-bottom: 8px;
}

.gchat-profile-msg-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.gchat-profile-msg-input {
    flex-grow: 1;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #555;
    background: #1c1c2e;
    color: #fff;
    font-size: 12px;
}

/* Top Rooms Bar */
.gchat-top-bar {
    margin: 0 3px 15px;
}

.gchat-top-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.gchat-settings-btn {
    background: linear-gradient(145deg, #7f7f7f, #4a4a4a, #2d2d2d);
    color: white;
    border: 2px solid #c0c0c0;
    border-radius: 12px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

.gchat-settings-btn:hover {
    background: linear-gradient(145deg, #9a9a9a, #5a5a5a, #3d3d3d);
}

.gchat-settings-panel {
    display: none;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #c9d6e8;
}

.gchat-settings-panel.open {
    display: block;
}

.gchat-settings-panel label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.gchat-room-emoji-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gchat-room-emoji-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: linear-gradient(145deg, #ddd, #bbb);
    box-shadow: 1px 1px 3px #aaa, -1px -1px 3px #fff;
    border: none;
    border-radius: 8px;
    padding: 4px 7px;
    font-size: 13px;
    cursor: pointer;
    transition: transform 0.2s;
    min-width: 40px;
}

.gchat-room-emoji-btn span {
    font-size: 9px;
    font-weight: bold;
    color: #222;
}

.gchat-room-emoji-btn:hover {
    transform: translateY(-3px);
}

.gchat-room-emoji-btn.active {
    background: linear-gradient(145deg, #8a7fe0, #6c5ce7);
}

.gchat-room-emoji-btn.active span {
    color: #fff;
}

.gchat-room-emoji-btn.add-room {
    background: linear-gradient(145deg, #666, #333);
}

.gchat-room-emoji-btn.add-room span {
    color: #ddd;
}

.gchat-self-preview-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 14px;
}

.gchat-self-preview-box {
    width: 160px;
    height: 100px;
    background: #1c1c2e;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.gchat-self-preview-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gchat-self-preview-label {
    font-size: 12px;
    color: #c9d6e8;
}

/* ===== Lobby (center) ===== */
.gchat-video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.gchat-video-tile {
    background: #1c1c2e;
    border-radius: 10px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 13px;
    position: relative;
}

.gchat-video-tile span.gchat-tile-name {
    position: absolute;
    bottom: 6px;
    left: 8px;
    font-size: 11px;
    color: #fff;
    background: rgba(0,0,0,0.5);
    padding: 2px 6px;
    border-radius: 6px;
}

.gchat-call-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
}

.gchat-call-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ddd, #bbb);
    box-shadow: 2px 2px 5px #aaa, -2px -2px 5px #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}

.gchat-call-btn:hover {
    transform: scale(1.1);
}

.gchat-call-btn.end-call {
    background: linear-gradient(145deg, #e24b4a, #a83030);
}

.gchat-lobby-chat {
    background: #e8e8e8;
    border-radius: 12px;
    padding: 12px;
}

.gchat-lobby-messages {
    max-height: 160px;
    overflow-y: auto;
    margin-bottom: 10px;
    font-size: 13px;
    color: #222;
}

.gchat-lobby-messages .msg {
    margin-bottom: 6px;
}

.gchat-lobby-messages .msg b {
    color: #6c5ce7;
}

.gchat-lobby-input-row {
    display: flex;
    gap: 8px;
}

.gchat-lobby-input {
    flex-grow: 1;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #bbb;
    font-size: 13px;
}

.gchat-gift-btn {
    background: #555;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    padding: 6px 10px;
    cursor: pointer;
}

.gchat-gift-btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
}

.gchat-send-btn {
    background-color: #6c5ce7;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
}

/* ===== Right column (Premium features) ===== */
.gchat-right-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.gchat-right-tab-btn {
    flex: 1;
    background-color: #555;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 4px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

.gchat-right-tab-btn.active {
    background-color: #6c5ce7;
}

.gchat-lock-overlay {
    text-align: center;
    padding: 30px 10px;
    color: #c9d6e8;
    font-size: 13px;
}

.gchat-lock-overlay .lock-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.gchat-upgrade-btn {
    margin-top: 12px;
    background-color: #6c5ce7;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
}

.gchat-upgrade-btn:hover {
    background-color: #8a7fe0;
}

.gchat-dm-item, .gchat-email-item {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}

.gchat-dm-item b, .gchat-email-item b {
    color: #6c5ce7;
}

/* ===== Selfie Verification Modal ===== */
.gchat-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.gchat-modal-overlay.open {
    display: flex;
}

.gchat-modal-box {
    background: #0d1440;
    border-radius: 15px;
    padding: 20px;
    max-width: 420px;
    width: 90%;
    text-align: center;
}

.gchat-modal-box h3 {
    color: #fff;
    margin-top: 0;
}

.gchat-modal-box p {
    color: #c9d6e8;
    font-size: 13px;
}

#gchatWebcam, #gchatCanvas {
    width: 100%;
    border-radius: 10px;
    background: #000;
    margin: 10px 0;
}

.gchat-modal-btn {
    background-color: #6c5ce7;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 14px;
    margin: 4px;
}

.gchat-modal-btn.cancel {
    background-color: #555;
}

.gchat-verified-badge {
    color: #69BE28;
    font-weight: bold;
    font-size: 16px;
}

/* Tier visibility rules */
body[data-tier="regular"] .premium-only {
    display: none !important;
}

body[data-tier="regular"] .regular-locked {
    display: block;
}

body[data-tier="premium"] .regular-locked {
    display: none !important;
}

.gchat-page .footer {
    background-color: #000;
}

@media (max-width: 900px) {
    .gchat-grid {
        grid-template-columns: 1fr;
    }
}
