/* ==================== GLOBAL ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0b141a;
  color: white;
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 10px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

/* ==================== HEADER ==================== */
.header {
  text-align: center;
  padding: 15px 0;
  border-bottom: 1px solid #1f2a34;
  margin-bottom: 15px;
}

.header h2 {
  color: #00d4ff;
  margin-bottom: 5px;
}

#status {
  text-align: center;
  padding: 10px;
  margin: 10px 0;
  border-radius: 8px;
  font-weight: bold;
  background: #1f2a34;
}

/* Profile Card */
.profile-card {
  display: flex;
  align-items: center;
  background: #1f2a34;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 15px;
  gap: 12px;
}

.profile-card img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-info h3 {
  margin: 0;
  font-size: 18px;
}

.profile-info p {
  margin: 4px 0;
  font-size: 14px;
  opacity: 0.8;
}

.profile-loader {
  width: 70px;
  height: 70px;
  border: 5px solid #2a3942;
  border-top: 5px solid #25D366;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Chat Box */
.chat-box {
  height: 55vh;
  overflow-y: auto;
  background: #111b21;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Messages */
.message {
  display: flex;
  align-items: flex-end;
  margin: 10px 0;
  gap: 8px;
  width: 100%;
}

.my-message {
  justify-content: flex-end;
}

.stranger-message,
.friend-message {
  justify-content: flex-start;
}

.bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 15.5px;
  line-height: 1.4;
  position: relative;

  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

.my-message .bubble {
  background: #005C4B;
  color: white;
  border-bottom-right-radius: 5px;
}

.stranger-message .bubble,
.friend-message .bubble {
  background: #202C33;
  color: #FFFFFF;
  border-bottom-left-radius: 5px;
}

.time {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 4px;
  display: block;
}

/* Input Area */
.input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1f2a34;
  padding: 8px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.message-input {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 30px;
  background: #2a2f36;
  color: white;
  font-size: 16px;
}

.message-input:focus {
  outline: none;
  background: #32383f;
}

.attach-btn, .send-btn {
  padding: 12px 16px;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
}

.attach-btn {
  background: #2a2f36;
}

.send-btn {
  background: #00d4ff;
  color: black;
}

/* Action Buttons */
/* Action Buttons Container - Better Version */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  padding: 0 10px;           /* Mobile pe achha spacing */
}

/* Common styling for all buttons inside */
.action-buttons button {
  padding: 12px 22px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  min-width: 100px;           
}

/* Hover Effect (Common) */
.action-buttons button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Active/Pressed Effect */
.action-buttons button:active {
  transform: scale(0.96);
}

/* Next Button - Orange */
.next-btn {
  background: #ff9800;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.next-btn:hover {
  background: #f57c00;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 152, 0, 0.4);
}

/* Friend Button - Green */
.friend-btn {
  background: #22c55e;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.friend-btn:hover {
  background: #16a34a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

/* Logout Button - Red */
.logout-btn {
  background: #ef4444;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.logout-btn:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* Selected File */
.selected-file {
  text-align: center;
  font-size: 14px;
  color: #00d4ff;
  margin: 5px 0;
}

/* Scrollbar */
.chat-box::-webkit-scrollbar {
  width: 6px;
}

.chat-box::-webkit-scrollbar-thumb {
  background: #33414d;
  border-radius: 10px;
}

/* ==================== GLASSMORPHISM + NEON ==================== */
.auth-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0f14, #1a1f2e);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 45px 35px;
  border-radius: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.neon-text {
  color: #00f0ff;
  text-shadow: 
    0 0 10px #00f0ff,
    0 0 20px #00f0ff,
    0 0 40px #00aaff;
  font-size: 32px;
  margin-bottom: 8px;
}

.tagline {
  color: #88ddff;
  margin-bottom: 30px;
  font-size: 15.5px;
  opacity: 0.9;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
  width: 100%;
  padding: 16px;
  margin: 10px 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  color: white;
  font-size: 16px;
}

.auth-form input:focus,
.auth-form textarea:focus {
  outline: none;
  border-color: #00f0ff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.neon-btn {
  width: 100%;
  padding: 16px;
  margin: 25px 0 15px;
  background: transparent;
  color: #00f0ff;
  border: 2px solid #00f0ff;
  border-radius: 12px;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.4s;
  text-shadow: 0 0 10px #00f0ff;
}

.neon-btn:hover {
  background: #00f0ff;
  color: #000;
  box-shadow: 0 0 25px #00f0ff;
  transform: scale(1.03);
}

.switch-link a {
  color: #00f0ff;
  font-weight: bold;
}

/* Gender Selection */
.gender-group {
  display: flex;
  gap: 15px;
  margin: 15px 0;
  justify-content: center;
}

.gender-option {
  flex: 1;
  padding: 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
}

.gender-option:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: #00f0ff;
}

.gender-option input {
  display: none;
}

.gender-option span {
  font-size: 16px;
  color: white;
}

.gender-option input:checked + span {
  color: #00f0ff;
  font-weight: bold;
}

/* ==================== INDEX PAGE ==================== */
.index-card {
  padding: 50px 40px;
  text-align: center;
}

.index-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 35px 0;
}

.index-buttons button {
  width: 100%;
  padding: 16px;
  font-size: 18px;
}

.glass-card {
  animation: glow 4s infinite alternate;
}

@keyframes glow {
  from { box-shadow: 0 0 15px rgba(0, 240, 255, 0.3); }
  to   { box-shadow: 0 0 30px rgba(0, 240, 255, 0.6); }
}

/* ==================== PRIVATE CHAT ==================== */
.private-chat-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 10px;
}

.chat-header {
  background: #111b21;
  padding: 15px;
  border-radius: 12px 12px 0 0;
  text-align: center;
}

.chat-area {
  height: 60vh;
  overflow-y: auto;
  background: #0a0f14;
  padding: 15px;
  border-radius: 0 0 12px 12px;
}

.typing-status {
  text-align: center;
  font-style: italic;
  color: #00d4ff;
  margin: 5px 0;
}

.emoji-btn, .attach-btn {
  padding: 12px;
  background: #1f2a34;
  border: none;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
}



.danger {
  background: #ef4444;
  color: white;
}

/* Emoji Picker */
.emoji-picker {
  position: absolute;
  background: #1f2a34;
  border: 1px solid #33414d;
  padding: 10px;
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  z-index: 100;
}

/* ==================== MY FRIENDS PAGE ==================== */
.page-container {
  max-width: 900px;
  margin: 20px auto;
  padding: 20px;
}

.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
}

.friend-card {
  background: #1f2a34;
  border-radius: 12px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: 0.3s;
}

.friend-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 212, 255, 0.2);
}

.friend-card img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.friend-info {
  flex: 1;
}

.friend-info h3 {
  margin: 0 0 5px 0;
  font-size: 18px;
}

.friend-info p {
  margin: 0;
  font-size: 14px;
  opacity: 0.8;
}

.unread-count {
  background: #ef4444;
  color: white;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 50%;
  font-weight: bold;
}

.chat-button {
  background: #00d4ff;
  color: #000;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  margin-left: auto;
}

.chat-button:hover {
  background: #00b8e0;
  transform: scale(1.05);
}

.request-actions {
  display: flex;
  gap: 8px;
}

/* Accept Button */
.accept-btn {
  background: #22c55e;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
  min-width: 120px;
}

.accept-btn:hover {
  background: #16a34a;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

/* Reject Button */
.reject-btn {
  background: #ef4444;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  min-width: 120px;
}

.reject-btn:hover {
  background: #dc2626;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* Active effect */
.accept-btn:active,
.reject-btn:active {
  transform: scale(0.95);
}

/* Profile Bar */
#myProfileBar {
  position: absolute;
  top: 15px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: #202c33;
  padding: 8px 12px;
  border-radius: 30px;
}

#myProfileBar:hover {
  background: #2a3942;
}

.myAvatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #25D366;
}

.chat-avatar,
.chatAvatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 8px;
  align-self: flex-end;
  flex-shrink: 0;
}

.msgAvatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

/* Reply Box */
.reply-box {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: #1f2c34;
  border-left: 4px solid #25D366;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.reply-content { flex: 1; }

.reply-title {
  font-size: 13px;
  font-weight: bold;
  color: #25D366;
  margin-bottom: 3px;
}

.reply-text {
  font-size: 14px;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-close {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

/* Message Menu */
.msgMenuBtn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 18px;
  display: none;
}

.bubble { position: relative; }

.message:hover .msgMenuBtn {
  display: block;
}

.message-menu {
  display: none;
  position: fixed;
  background: #202c33;
  border-radius: 10px;
  overflow: hidden;
  z-index: 99999;
  box-shadow: 0 5px 20px rgba(0,0,0,.4);
}

.menuItem {
  padding: 12px 18px;
  color: white;
  cursor: pointer;
}

.menuItem:hover {
  background: #2d3b44;
}

/* Image Modal */
.image-modal {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: pointer;
}

.image-modal img {
  max-width: 80%;
  max-height: 80%;
  border-radius: 15px;
  object-fit: contain;
}

.profileAvatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #4cafef;
}

.profile-popup {
  position: relative;
  background: #222;
  padding: 25px;
  border-radius: 20px;
  text-align: center;
  width: 320px;
}

.profile-popup img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
}



/* Mobile */
@media (max-width: 600px) {
  .profile-popup button {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
  }

  .profile-popup button::after {
    font-size: 25px;
  }
}

.chatImage {
  width: 220px;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  margin-top: 5px;
  cursor: pointer;
  object-fit: cover;
}
.game-menu{
    position:absolute;
    background:#222;
    padding:10px;
    border-radius:10px;
    border:1px solid #555;
    z-index:1000;
}

.game-menu button{
    width:200px;
    margin:5px 0;
    padding:8px;
    cursor:pointer;
}

#board{

display:grid;
grid-template-columns:repeat(3,80px);
gap:8px;
margin-top:15px;

}

.cell{

width:80px;
height:80px;
font-size:35px;
font-weight:bold;
cursor:pointer;

}
#gameResult{

display:none;
text-align:center;
margin-bottom:15px;
padding:10px;
background:#222;
border-radius:10px;

}

#gameResult button {
    margin: 8px;
    padding: 10px 22px;           /* chhota padding */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;              /* chhota font */
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    min-width: 120px;             /* chhota minimum width */
}

/* Hover Effect */
#gameResult button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Click Effect */
#gameResult button:active {
    transform: scale(0.96);
}
.winner{

    background:#00c853 !important;

    color:white !important;

    animation:blink 0.6s infinite alternate;

}

@keyframes blink{

from{
opacity:1;
}

to{
opacity:0.6;
}

}
#scoreBoard{

    margin:10px 0;
    font-size:18px;
    font-weight:bold;
    text-align:center;

}
.gameModal{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.gameContent{
    background: #222;
    padding: 20px;
    border-radius: 15px;
}
#rpsGame{

    text-align:center;

}

.rpsButtons{

    display:flex;
    justify-content:center;
    gap:20px;
    margin-top:20px;

}

.rpsChoice{

    font-size:40px;
    width:90px;
    height:90px;
    border-radius:50%;
    cursor:pointer;

}


#rpsScoreBoard{
    display:flex;
    justify-content:space-between;
    margin:15px 0;
    font-size:18px;
    font-weight:bold;
}

#rpsResult {
    margin-top: 30px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    padding: 16px 24px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
}

.game-popup{
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75); /* Dark overlay */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.game-popup-box{
    width: 380px;
    background: rgba(28,28,30,.92);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    padding: 28px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,.5);
    animation: popup .25s ease;
}
.game-popup-box{

    max-height:80vh;

    overflow-y:auto;

    overflow-x:hidden;

    padding-right:8px;

}
.game-popup-box::-webkit-scrollbar{

    width:8px;

}

.game-popup-box::-webkit-scrollbar-track{

    background:#1b1b1b;

    border-radius:10px;

}

.game-popup-box::-webkit-scrollbar-thumb{

    background:#00c6ff;

    border-radius:10px;

}

.game-popup-box::-webkit-scrollbar-thumb:hover{

    background:#0099ff;

}

.game-popup-box button{
    width: 100%;
    padding: 18px;
    margin: 12px 0;
    font-size: 22px;
    color: #fff;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    cursor: pointer;
    transition: .25s;
}

.game-popup-box button:hover{
    background: rgba(0,170,255,.18);
    border-color: #00aaff;
    transform: translateY(-2px);
}

.game-popup-box button:disabled{
    color: #777;
    cursor: not-allowed;
    background: rgba(255,255,255,.03);
}

@keyframes popup{
    from{
        transform: scale(.9);
        opacity: 0;
    }
    to{
        transform: scale(1);
        opacity: 1;
    }
}
#closeGamePopup{
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 50%;

    color: #fff;
    font-size: 28px;
    font-weight: 600;
    cursor: pointer;

    transition: all .25s ease;
    z-index: 10000;
}

#closeGamePopup:hover{
    background: #ff4d4d;
    border-color: #ff4d4d;
    color: #fff;
    transform: rotate(90deg) scale(1.05);
}
.typing-dots::after{
    content:"";
    animation:dots 1.2s infinite;
}

@keyframes dots{

0%{
content:"";
}

33%{
content:".";
}

66%{
content:"..";
}

100%{
content:"...";
}

}
#friendRequestPopup{
    display: none;

    position: fixed;

    top: 0;
    right: 0;

    width: 450px;
    height: 100vh;

    background: #202c33;

    z-index: 999999;

    justify-content: flex-start;
    align-items: flex-start;
}

.friendRequestContainer{
    width: 100%;
    height: 100%;

    padding: 25px;

    overflow-y: auto;

    box-sizing: border-box;
}
#closeFriendRequest {
    position: absolute;
    top: 15px;
    right: 20px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 22px;
    color: #ff4d4d;
    cursor: pointer;

    border-radius: 50%;
    transition: all 0.3s ease;

    animation: closePop .45s ease;
}

/* Hover */
#closeFriendRequest:hover {
    background: rgba(255, 77, 77, 0.15);
    color: #fff;
    transform: rotate(90deg) scale(1.15);
    box-shadow: 0 0 12px rgba(255, 77, 77, 0.5);
}

/* Click */
#closeFriendRequest:active {
    transform: scale(0.9);
}

/* Popup Open Animation */
@keyframes closePop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    70% {
        transform: scale(1.15) rotate(10deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0);
    }
}
#myFriendsPopup{
    display:none;

    position:fixed;

    top:0;
    right:0;

    width:450px;
    height:100vh;

    background:#202c33;

    z-index:999999;

    justify-content:flex-start;
    align-items:flex-start;
}

.myFriendsContainer{

    width:100%;
    height:100%;

    padding:25px;

    overflow-y:auto;

    box-sizing:border-box;
}
#closeMyFriends{
    position:absolute;
    top:15px;
    right:20px;

    width:38px;
    height:38px;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:22px;

    color:#ff4d4d;

    cursor:pointer;

    border-radius:50%;

    transition:.3s;

    animation:closePop .45s ease;
}

#closeMyFriends:hover{

    background:rgba(255,77,77,.15);

    color:#fff;

    transform:rotate(90deg) scale(1.15);

    box-shadow:0 0 12px rgba(255,77,77,.5);

}

#closeMyFriends:active{

    transform:scale(.9);

}
#backToStrangerBtn{
    padding:10px 18px;
    background:#2f80ff;
    color:#fff;
    border:none;
    border-radius:10px;
    font-size:18px;
    font-weight:600;
    cursor:pointer;
    transition:0.3s;
    display:inline-flex;
    align-items:center;
    gap:8px;
    width:fit-content;
}
#backToStrangerBtn{
    position: absolute;
    left: 20px;
    top: 15px;
}
/* ================= TIC TAC TOE NEW UI ================= */

#ticTacToe{
    display:flex;
    flex-direction:column;
    width:950px;
    max-width:95vw;
    background:#1b2631;
    border-radius:20px;
    padding:25px;
}

#ticHeader{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

#ticHeader h2{
    color:#00d4ff;
    font-size:30px;
}

#turnText{
    font-size:20px;
    font-weight:bold;
    color:#ffd54f;
}

#ticMain{
    display:flex;
    gap:25px;
    align-items:center;
}

#ticSidebar{
    width:260px;
    display:flex;
    flex-direction:column;
    gap:18px;
}

.ticPlayerCard{
    display:flex;
    align-items:center;
    gap:12px;
    background:#24313d;
    border-radius:15px;
    padding:15px;
}

.ticAvatar{
    width:70px;
    height:70px;
    border-radius:50%;
    object-fit:cover;
    border:3px solid #00d4ff;
}

.ticPlayerInfo{
    display:flex;
    flex-direction:column;
    gap:5px;
}

.ticPlayerInfo span:first-child{
    font-size:20px;
    font-weight:bold;
}

.ticPlayerInfo span:last-child{
    color:#00d4ff;
    font-size:18px;
}

#ticCenter{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
}

#board{
    display:grid;
    grid-template-columns:repeat(3,120px);
    gap:12px;
}

.cell{
    width:120px;
    height:120px;
    border:none;
    border-radius:18px;
    background:#2b3945;
    color:white;
    font-size:60px;
    cursor:pointer;
    transition:.3s;
}

.cell:hover{
    background:#3b4d5c;
    transform:scale(1.05);
}

#gameResult{
    margin-top:25px;
    width:100%;
    text-align:center;
}

#gameResult button{
    margin:10px;
}
#rpsMain{
    display:flex;
    gap:25px;
}

#rpsSidebar{
    width:230px;
    display:flex;
    flex-direction:column;
    gap:20px;
}

.rpsPlayerCard{
    background:#2d2d2d;
    padding:15px;
    border-radius:12px;
    display:flex;
    align-items:center;
    gap:12px;
}

.rpsAvatar{
    width:60px;
    height:60px;
    border-radius:50%;
    object-fit:cover;
}

.rpsPlayerInfo{
    display:flex;
    flex-direction:column;
    gap:5px;
}

#rpsCenter{
    flex:1;
    text-align:center;
}
/* ================= RPS Bottom Buttons ================= */

#rpsButtons{
    display:flex;
    justify-content:center;
    gap:15px;
    margin-top:25px;
}

#rpsButtons button{
    padding:12px 28px;
    border:none;
    border-radius:10px;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    transition:all .3s ease;
    color:#fff;
    min-width:140px;
}

/* Rematch */
#rpsRematchBtn{
    background:linear-gradient(135deg,#00c853,#00a844);
    box-shadow:0 5px 15px rgba(0,200,83,.35);
}

#rpsRematchBtn:hover{
    background:linear-gradient(135deg,#00e676,#00c853);
    transform:translateY(-3px);
    box-shadow:0 8px 20px rgba(0,230,118,.45);
}

#rpsRematchBtn:active{
    transform:scale(.96);
}

/* Close */
#closeRpsBtn{
    background:linear-gradient(135deg,#ff5252,#e53935);
    box-shadow:0 5px 15px rgba(255,82,82,.35);
}

#closeRpsBtn:hover{
    background:linear-gradient(135deg,#ff6e6e,#ff5252);
    transform:translateY(-3px);
    box-shadow:0 8px 20px rgba(255,82,82,.45);
}

#closeRpsBtn:active{
    transform:scale(.96);
}
/* ==================== MOBILE RESPONSIVE ==================== */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

@media (max-width: 600px) {

  body {
    padding: 0;
  }

  /* Homepage */
  .auth-container {
    min-height: 100svh;
    padding: 15px;
  }

  .glass-card {
    width: 100%;
    max-width: 100%;
    padding: 35px 20px;
    border-radius: 20px;
  }

  .index-card {
    padding: 40px 20px;
  }

  .neon-text {
    font-size: 28px;
  }

  .tagline {
    font-size: 14px;
    margin-bottom: 25px;
  }

  .index-buttons {
    margin: 25px 0;
    gap: 12px;
  }

  .index-buttons button {
    padding: 14px;
    font-size: 16px;
  }

  .hero-desc {
    font-size: 14px;
    line-height: 1.6;
  }

  /* Chat */
  .container,
  .private-chat-container {
    width: 100%;
    max-width: 100%;
    padding: 8px;
  }

  .chat-box {
    height: 60svh;
    padding: 10px;
  }

  .bubble {
    max-width: 82%;
    font-size: 15px;
    padding: 10px 13px;
  }

  .input-area {
    gap: 5px;
    padding: 6px;
  }

  .message-input {
    min-width: 0;
    padding: 12px;
    font-size: 16px;
  }

  .attach-btn,
  .send-btn,
  .emoji-btn {
    flex-shrink: 0;
    padding: 10px;
    font-size: 19px;
  }

  /* Friends */
  .page-container {
    width: 100%;
    padding: 12px;
    margin: 10px auto;
  }

  .friends-grid {
    grid-template-columns: 1fr;
  }

  .friend-card {
    min-width: 0;
    padding: 12px;
  }

  .request-actions {
    flex-wrap: wrap;
  }

  /* Right-side panels */
  #friendRequestPopup,
  #myFriendsPopup {
    width: 100%;
    max-width: 100%;
  }

  .friendRequestContainer,
  .myFriendsContainer {
    padding: 20px 15px;
  }

  /* Game popup */
  .game-popup-box {
    width: calc(100% - 30px);
    max-width: 380px;
    max-height: 85svh;
    padding: 22px 15px;
  }

  .game-popup-box button {
    padding: 15px;
    font-size: 18px;
  }

  /* Game modal */
  .gameContent {
    width: calc(100% - 20px);
    max-width: 100%;
    max-height: 90svh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* Tic Tac Toe */
  #ticTacToe {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    padding: 15px;
  }

  #ticMain {
    flex-direction: column;
    gap: 15px;
  }

  #ticSidebar {
    width: 100%;
  }

  #ticHeader {
    flex-wrap: wrap;
    gap: 10px;
  }

  #ticHeader h2 {
    font-size: 24px;
  }

  #turnText {
    font-size: 16px;
  }

  #board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(90vw, 330px);
    gap: 7px;
  }

  .cell {
    width: auto;
    height: auto;
    aspect-ratio: 1;
    font-size: clamp(35px, 12vw, 55px);
  }

  /* RPS */
  #rpsMain {
    flex-direction: column;
    gap: 15px;
  }

  #rpsSidebar {
    width: 100%;
  }

  #rpsButtons {
    flex-wrap: wrap;
  }

  #rpsButtons button {
    min-width: 120px;
  }

  .rpsButtons {
    flex-wrap: wrap;
    gap: 10px;
  }

  .rpsChoice {
    width: 75px;
    height: 75px;
    font-size: 32px;
  }

  /* Profile popup */
  .profile-popup {
    width: calc(100% - 30px);
    max-width: 320px;
  }

  .profile-popup img {
    width: 120px;
    height: 120px;
  }

  /* Image modal */
  .image-modal img {
    max-width: 92%;
    max-height: 80%;
  }

  /* My profile bar */
  #myProfileBar {
    position: static;
    width: fit-content;
    max-width: 100%;
    margin: 10px 10px 10px auto;
  }

  /* Back button */
  #backToStrangerBtn {
    position: static;
    margin: 10px;
  }
}
/* ================= FRIEND REQUEST MOBILE FIX ================= */

@media (max-width: 600px) {

    #friendRequestPopup {
        width: 100%;
        height: 100dvh;
    }

    .friendRequestContainer {
        width: 100%;
        padding: 60px 12px 20px;
        overflow-y: auto;
        box-sizing: border-box;
    }

    /* Friend request card */
    .friendRequestContainer .friend-card {
        width: 100%;
        padding: 12px;
        margin-bottom: 10px;
        gap: 10px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
    }

    /* Avatar */
    .friendRequestContainer .friend-card img {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }

    /* Name / info */
    .friendRequestContainer .friend-info {
        min-width: 0;
        flex: 1;
    }

    .friendRequestContainer .friend-info h3 {
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .friendRequestContainer .friend-info p {
        font-size: 12px;
    }

    /* Buttons */
  .friendRequestContainer .request-actions {
    display: flex;
    flex-direction: row;
    gap: 6px;
    flex-shrink: 0;
}

.friendRequestContainer .accept-btn,
.friendRequestContainer .reject-btn {
    min-width: 70px;
    width: 70px;
    padding: 8px 4px;
    font-size: 11px;
}

    /* Close button */
    #closeFriendRequest {
        top: 12px;
        right: 12px;
        z-index: 20;
    }
}
/* ================= MOBILE HEADER ONLY ================= */

@media (max-width: 600px) {

    .header {
        display: flex;
        align-items: center;
        justify-content: space-between;

        padding: 10px 12px;
        min-height: 60px;

        background: #111b21;
        border-bottom: 1px solid #26343d;
        border-radius: 0 0 15px 15px;

        box-sizing: border-box;
    }

    .header h2 {
        margin: 0;
        font-size: 19px;
        font-weight: 700;
        color: #00d4ff;
    }

    /* Right side avatar */
    #myProfileBar {
        position: static;
        width: auto;
        margin: 0;
        padding: 4px 6px;

        background: transparent;

        display: flex;
        align-items: center;
    }

    #myProfileBar:hover {
        background: transparent;
    }

    /* Avatar */
    .myAvatar {
        width: 40px;
        height: 40px;

        border-radius: 50%;
        border: 2px solid #25D366;

        box-shadow:
            0 0 0 3px rgba(37,211,102,.08),
            0 0 12px rgba(37,211,102,.25);
    }

}
/* =====================================================
   MOBILE — SAME WEBSITE BUTTON STYLE
   Sirf size/layout mobile ke liye adjust
===================================================== */

@media (max-width: 600px) {

    .action-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;

        margin: 15px 4px 8px;
        padding: 0;
    }

    .action-buttons button {
        width: 100%;
        min-width: 0;

        height: 44px;
        padding: 8px 10px;

        border: none;
        border-radius: 8px;

        font-size: 13px;
        font-weight: 600;

        cursor: pointer;

        transition: all 0.3s ease;
    }


    /* ================= NEXT ================= */

    .next-btn {
        background: #ff9800 !important;
        color: white !important;

        box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3) !important;
    }

    .next-btn:hover {
        background: #f57c00 !important;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(255, 152, 0, 0.4) !important;
    }


    /* ================= ADD FRIEND ================= */

    .friend-btn {
        background: #22c55e !important;
        color: white !important;

        box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3) !important;
    }

    .friend-btn:hover {
        background: #16a34a !important;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4) !important;
    }


    /* ================= FRIEND REQUESTS ================= */

    #friendRequestBtn {
        grid-column: 1 / -1;

        height: 44px;

        background: #263b46 !important;
        color: white !important;

        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    }

    #friendRequestBtn:hover {
        background: #304955 !important;
        transform: translateY(-2px);
    }


    /* ================= MY FRIENDS ================= */

    #myFriendsBtn {
        grid-column: 1 / -1;

        height: 44px;

        background: #263b46 !important;
        color: white !important;

        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    }

    #myFriendsBtn:hover {
        background: #304955 !important;
        transform: translateY(-2px);
    }


    /* ================= GAMES ================= */

    #gameBtn {
        height: 44px;

        background: #263b46 !important;
        color: white !important;

        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    }

    #gameBtn:hover {
        background: #304955 !important;
        transform: translateY(-2px);
    }


    /* ================= BLOCK ================= */

    .danger {
        height: 44px;

        background: #263b46 !important;
        color: #ff7777 !important;

        border: none !important;

        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15) !important;
    }

    .danger:hover {
        background: #3a3033 !important;
        transform: translateY(-2px);
    }


    /* ================= LOGOUT ================= */

    .logout-btn {
        grid-column: 1 / -1;

        width: 55% !important;
        justify-self: center;

        height: 44px;

        margin-top: 2px;

        background: #ef4444 !important;
        color: white !important;

        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
    }

    .logout-btn:hover {
        background: #dc2626 !important;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4) !important;
    }


   /* ================= MOBILE BUTTON PRESS EFFECT ================= */

.action-buttons button {
    -webkit-tap-highlight-color: transparent;
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease,
        filter 0.12s ease;
}

.action-buttons button:active {
    transform: translateY(1px) scale(0.98);
    filter: brightness(0.92);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18) !important;
}

/* ================= MOBILE BACK BUTTON ================= */

@media (max-width: 600px) {

    

    #backToStrangerBtn {
        padding: 10px 14px;
        border: none;
        border-radius: 10px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
    }

}


 /* =========================================================
   MOBILE MORE BUTTON
   ========================================================= */

.more-btn,
#moreBtn {
    display: inline-flex;
}


/* =========================================================
   DESKTOP ACTION BUTTONS
   ========================================================= */

.desktop-action {
    display: none !important;
}


/* =========================================================
   MORE POPUP OVERLAY
   SAME STYLE AS GAME POPUP
   ========================================================= */

#morePopup {
    position: fixed !important;
    inset: 0 !important;

    width: 100vw !important;
    height: 100dvh !important;

    margin: 0 !important;
    padding: 20px !important;

    display: none !important;

    align-items: center !important;
    justify-content: center !important;

    background: rgba(0, 0, 0, 0.72) !important;

    box-sizing: border-box;

    z-index: 999999 !important;

    overflow: hidden !important;
}


/* =========================================================
   OPEN
   ========================================================= */

#morePopup.show {
    display: flex !important;
}


/* =========================================================
   MORE BOX
   SAME AS GAME POPUP
   ========================================================= */

#morePopup .more-popup-box {

    position: relative !important;

    width: calc(100% - 20px) !important;
    max-width: 480px !important;

    max-height: 85svh !important;

    padding: 44px 20px 20px !important;

    margin: 0 !important;

    background: #1b1c1e !important;

    border: 1px solid rgba(255,255,255,0.08) !important;

    border-radius: 22px !important;

    box-shadow:
        0 20px 50px rgba(0,0,0,0.65) !important;

    box-sizing: border-box !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    scrollbar-width: thin;

    animation: morePopupShow .22s ease;
}


/* =========================================================
   OPEN ANIMATION
   ========================================================= */

@keyframes morePopupShow {

    from {
        opacity: 0;
        transform: scale(0.94) translateY(8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

}


/* =========================================================
   CLOSE BUTTON
   GAME POPUP STYLE
   ========================================================= */

#morePopup #closeMorePopup {

    position: absolute !important;

    top: 14px !important;
    right: 14px !important;

    width: 48px !important;
    height: 48px !important;

    min-width: 48px !important;
    min-height: 48px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: none !important;

    border-radius: 50% !important;

    background: #303134 !important;

    color: white !important;

    font-size: 28px !important;
    font-weight: 400 !important;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    cursor: pointer !important;

    z-index: 10 !important;

    box-shadow:
        0 4px 12px rgba(0,0,0,0.35) !important;

    transition:
        background .2s ease,
        transform .15s ease !important;
}


#morePopup #closeMorePopup:hover {

    background: #414247 !important;

    transform: scale(1.05);
}


#morePopup #closeMorePopup:active {

    transform: scale(.92);
}


/* =========================================================
   TITLE
   HIDE IT
   GAME POPUP DOES NOT HAVE TITLE
   ========================================================= */

#morePopup .more-popup-box h2,
#morePopup .more-popup-box h3 {

    display: none !important;
}


/* =========================================================
   MORE MENU BUTTONS
   SAME AS GAME POPUP
   ========================================================= */

#morePopup .more-popup-box > button:not(#closeMorePopup) {

    width: 100% !important;

    min-height: 56px !important;

    margin: 8px 0 !important;

    padding: 14px 18px !important;

    border: none !important;

    border-radius: 12px !important;

    background: #27282a !important;

    color: #ffffff !important;

    font-size: 17px !important;

    font-weight: 600 !important;

    font-family: inherit !important;

    display: flex !important;

    align-items: center !important;

    justify-content: space-between !important;

    text-align: left !important;

    cursor: pointer !important;

    box-sizing: border-box !important;

    transition:
        background .18s ease,
        transform .15s ease !important;
}


/* =========================================================
   HOVER
   ========================================================= */

#morePopup .more-popup-box > button:not(#closeMorePopup):hover {

    background: #303133 !important;

    transform: translateY(-1px);
}


/* =========================================================
   CLICK
   ========================================================= */

#morePopup .more-popup-box > button:not(#closeMorePopup):active {

    transform: scale(.98);

}


/* =========================================================
   LOGOUT
   ========================================================= */

#morePopup #mobileLogoutBtn {

    color: #ff7272 !important;

}


#morePopup #mobileLogoutBtn:hover {

    background: #302628 !important;

}


/* =========================================================
   SCROLLBAR
   ========================================================= */

#morePopup .more-popup-box::-webkit-scrollbar {

    width: 8px;

}


#morePopup .more-popup-box::-webkit-scrollbar-track {

    background: transparent;

}


#morePopup .more-popup-box::-webkit-scrollbar-thumb {

    background: #00cfff;

    border-radius: 10px;

}


#morePopup .more-popup-box::-webkit-scrollbar-thumb:hover {

    background: #00b8e6;

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 600px) {

    #morePopup {

        padding: 12px !important;

    }


    #morePopup .more-popup-box {

        width: calc(100% - 10px) !important;

        max-width: 480px !important;

        max-height: 85svh !important;

        padding:
            48px 12px 14px !important;

        border-radius: 20px !important;

    }


    #morePopup #closeMorePopup {

        top: 12px !important;
        right: 12px !important;

        width: 46px !important;
        height: 46px !important;

        min-width: 46px !important;
        min-height: 46px !important;

        font-size: 27px !important;

    }


    #morePopup .more-popup-box > button:not(#closeMorePopup) {

        min-height: 56px !important;

        margin: 8px 0 !important;

        padding: 14px 16px !important;

        font-size: 17px !important;

        border-radius: 12px !important;

    }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    #morePopup .more-popup-box {

        width: 94vw !important;

        padding:
            48px 10px 12px !important;

    }


    #morePopup .more-popup-box > button:not(#closeMorePopup) {

        min-height: 52px !important;

        font-size: 15px !important;

    }

}


/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 769px) {

    .more-btn,
    #moreBtn,
    #morePopup {

        display: none !important;

    }


    .desktop-action {

        display: block !important;

    }

}
/* =========================================================
   MOBILE ACTION BUTTON POSITION
   Games | Share
   Remove Friend | Back
========================================================= */

@media (max-width: 600px) {

    .action-buttons {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    /* Games */
    #gameBtn {
        grid-column: 1 !important;
        grid-row: 1 !important;
        width: 100% !important;
    }

    /* Share */
    #shareProfileBtn {
        grid-column: 2 !important;
        grid-row: 1 !important;
        width: 100% !important;
    }

    /* Remove Friend */
    #removeFriendBtn {
        grid-column: 1 !important;
        grid-row: 2 !important;
        width: 100% !important;
        height: 44px !important;
        min-width: 0 !important;
        padding: 8px 10px !important;
        font-size: 13px !important;
    }

    /* Back */
    #backBar {
        position: static !important;
        grid-column: 2 !important;
        grid-row: 2 !important;
        width: 100% !important;
        margin: 0 !important;
    }

    #backToStrangerBtn {
        position: static !important;
        width: 100% !important;
        height: 44px !important;
        min-width: 0 !important;
        padding: 8px 10px !important;
        font-size: 13px !important;
        margin: 0 !important;
        justify-content: center !important;
    }
}
@media (max-width: 600px) {

    .action-buttons {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    /* TOP ROW */
    #nextBtn {
        order: 1 !important;
        position: static !important;
        width: calc(50% - 4px) !important;
        flex: 0 0 calc(50% - 4px) !important;
    }

    #gameBtn {
        order: 3 !important;
        position: static !important;
        width: calc(50% - 4px) !important;
        flex: 0 0 calc(50% - 4px) !important;
    }

    /* BOTTOM ROW */
    #friendBtn {
        order: 2 !important;
        position: static !important;
        width: calc(50% - 4px) !important;
        flex: 0 0 calc(50% - 4px) !important;
    }

    #moreBtn {
        order: 4 !important;
        position: static !important;
        width: calc(50% - 4px) !important;
        flex: 0 0 calc(50% - 4px) !important;
    }

    /* Hide desktop buttons */
    .desktop-action {
        display: none !important;
    }
}
/* ================= MOBILE ACTION BUTTONS ================= */

@media (max-width: 600px) {

    .action-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
        margin-top: 10px;
    }

    .action-buttons > button {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        height: 42px;
        padding: 8px 10px;
        font-size: 13px;
        white-space: nowrap;
        box-sizing: border-box;
    }

    /* Game popup ko normal button ke upar rakho */
    #gamePopup {
        position: fixed;
        z-index: 99999;
    }

    /* Game button */
    #gameBtn {
        order: 1;
    }

    /* Share Profile */
    #shareProfileBtn {
        order: 2;
    }

    /* Remove Friend */
    .action-buttons .danger {
        order: 3;
    }

    /* Back */
    #backToStrangerBtn {
        order: 4;
    }

}
