* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}
:root {
    --background-color: white;
    --text-color: black;
    --header-bg: white;
    --navbar-bg: rgba(255, 255, 255, 0.3);
    --game-title-bg: rgba(0, 0, 0, 0.7);
    --input-border: rgba(0, 0, 0, 0.33);
    --modal-bg: rgba(255, 255, 255, 0.9);
    --search-icon-color: black;
    --card-shadow: rgba(0, 0, 0, 0.5);
    --chat-bg: rgba(255, 255, 255, 0.2);
    --chat-text-color: black;
    --chat-box-shadow: rgba(0, 0, 0, 0.2);
    --chat-input-bg: rgba(255, 255, 255, 0.1);
    --modal-border: rgba(0, 0, 0, 0.9);
    --svg-hover: black;
    --invert:invert(0);
    --sortback:white;
}

body.dark-mode {
    --background-color: black;
        --text-color: white;
        --header-bg: black;
        --navbar-bg: rgba(0, 0, 0, 0.3);
        --game-title-bg: rgba(255, 255, 255, 0.7);
        --input-border: rgba(255, 255, 255, 0.33);
        --modal-bg: rgba(0, 0, 0, 0.9);
        --search-icon-color: white;
        --card-shadow: rgba(255, 255, 255, 0.5);
        --chat-bg: rgba(0, 0, 0, 0.2);
        --chat-text-color: white;
        --chat-box-shadow: rgba(255, 255, 255, 0.2);
        --chat-input-bg: rgba(0, 0, 0, 0.1);
        --modal-border: rgba(255, 255, 255, 0.9);
        --svg-hover: white;
        --invert:invert(1);
        --sortback:rgba(0, 0, 0, 0.3);;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
}

body.modal-open {
    overflow: hidden;
}


.header {
    background-color: transparent;
}

.navbar {
    background-color: var(--navbar-bg);
}

.game-title {
    background-color: var(--game-title-bg);
}

.search-box {
    border: 1px var(--input-border) solid;
}

.search-icon {
    color: var(--search-icon-color);
}

.modal-content {
    background-color: var(--modal-bg);
}

.chat-box {
    background-color: var(--chat-bg);
    box-shadow: 0 0 10px var(--chat-box-shadow);
}

.chat-messages {
    color: var(--chat-text-color);
}

.chat-input textarea {
    background-color: var(--chat-input-bg);
}

.chat-input button {
    background-color: #0084ff4d;
}

/* Game card shadow and hover effects */
.game-card {
    box-shadow: 0 0 5px var(--card-shadow);
}
/* Apply transitions to background color and other properties */
body, .header, .navbar, .game-title, .search-box, .modal-content, .chat-box, .chat-messages, .chat-input textarea {
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

html{
    scroll-behavior: smooth;
    padding: 0;
    margin: 0;
}
body {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
    height: calc(100%);
}
.header{
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 60px;
    padding: 10px;
    box-sizing: border-box;
    font-size: 24px;
    margin-bottom: 20px;
    gap: 20px;
}
.navbar{
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 3;
    padding: 10px;
    box-sizing: border-box;
    font-size: 24px;
    border-radius: 10px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 10px var(--chat-box-shadow);
}
.navbar .brand {
    align-items: center;
    display: flex;
    justify-content: space-around;
    gap: 5px;
    cursor: pointer;
}
.navbar img {
    width: 30px;
}
.navbar title{
    text-align: center;
    align-items: center;
}
.navbar a {
    text-decoration: none; /* Remove underline */
    text-align: center;
    align-items: center;
    color: var(--text-color);
}
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 20px;
    width: 50%;
    }
    .search-box {
        border: 1px var(--text-color) solid;
        padding: 8px 12px 8px 32px; /* Adjust padding to make space for the icon */
        font-size: 16px;
        border-radius: 20px;
        background: transparent;
        width: 100%;
        text-align: center;
        color: var(--text-color);
        }
        
        .search-icon {
        position: absolute;
        left: 6px;
        top: 8px;
        font-size: 16px;
        }
.view-style{
    position: fixed;
    top: 0px;
    right: 10px;
    display: none;
    flex-direction: column;
    width: 45px;
    height: 45px;
    padding: 10px;
    border-radius: 10px;
    z-index: 1;
}
.view-style a{
    text-decoration: none;
    justify-content: center;
    align-items: center;
}
.view-style h2{
    display: none;
}
.container {
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
    gap: 20px;
    position: relative; /* Change to absolute to avoid fixed height issues */
    width: 100%; /* Adjust to allow more flexibility */
    max-height: calc(100%); /* Make it responsive */
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    scrollbar-width: none;
}


.game-card {
    position: relative;
    width: 250px;
    height: 350px;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.3s ease-in-out;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: #fff; /* Default background color */
}

.game-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Gradient overlay for hover effect */
.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 0, 150, 0.5), rgba(0, 204, 255, 0.5));
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 1;
    border-radius: 10px; /* Matches game-card border radius */
}

.game-card:hover::before {
    opacity: 1; /* Show gradient on hover */
}

/* Ensure card content is above the overlay */
.game-card img,
.game-card .game-title {
    z-index: 2;
}


.game-card img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    border-radius: 8px 8px 0 0;
    transition: opacity 0.3s ease-in-out;
}

/* Lazy loading styles */
.game-card img.lazy {
    opacity: 0.5;
    transform: scale(0.95);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.game-card img:not(.lazy) {
    opacity: 1;
    transform: scale(1);
}

.game-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    padding: 5px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.game-card:hover .game-title {
    opacity: 1;
}

.new-tag {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: red;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    z-index: 10000;
    background-color:var(--modal-bg);
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    margin: auto;
    text-align: center;
    overflow: auto;
    height: fit-content;
    max-height: calc(100vh - 10%);
    border: 1px solid var(--modal-border);
    transform-origin: center; /* Anchor point for scaling */
    animation: grow-modal 0.3s ease forwards;
}
@keyframes grow-modal {
    from {
        transform: scale(0.1);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
@keyframes close-modal {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.1); /* Shrinking down to disappear */
        opacity: 0;
    }
}
.modal.hide .modal-content {
    animation: close-modal 0.3s ease forwards; /* Closing animation */
}
.modal-close {
    color: var(--text-color);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: red;
}
.modal-game-details {
    display: flex;
    align-items: center;
    justify-content: start; /* Align the content to the left */
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    gap: 20px; /* Add space between the image and the title */
}

.modal-game-image {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
}

.modal-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-color);
}

.account-item {
    display: flex;
    flex-direction: row;
    margin: 8px 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid var(--modal-border);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    align-items: center;
    gap: 15px;
}

.account-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color, #007bff);
}

.account-item.new-account {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0.05) 100%);
    border: 2px solid #4CAF50;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.2);
}

.account-item.new-account::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #81C784);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.account-item-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 6px;
    
}

.account-time {
    font-size: 13px;
    color: var(--text-color);
    font-weight: 500;
    background: var(--chat-box-shadow);
    padding: 4px 8px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

.new-badge {
    background: linear-gradient(45deg, #4CAF50, #66BB6A);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
}

.new-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

.account-main-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.account-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.account-email,
.account-password {
    padding: 4px 6px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    word-break: break-all;
    line-height: 1.3;
}

.account-email:hover,
.account-password:hover {
    background: var(--chat-box-shadow);
    border-color: var(--primary-color);
}

.account-email:hover::after,
.account-password:hover::after {
    content: '📋';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.7;
}
.chat-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: var(--navbar-bg);
    color: var(--text-color);
    border: none;
    border-radius: 20px;
    width: fit-content;
    height: fit-content;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 0 10px var(--chat-box-shadow);
    padding: 20px;
    transition: all 0.3s ease-in-out;
    z-index: 5;
}

.chat-button:hover {
    background-color: var(--text-color);
    color: var(--background-color);
}

/* Chat box container */
.chat-box {
    position: fixed;
    bottom: 100px;
    left: -100vh;
    width: 350px;
    height: 80vh;
    background-color: var(--background-color);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--chat-box-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    opacity: 0;
    z-index: 1000;
}
.chat-box.active {
    left: 20px; /* Slide into view */
    opacity: 1;
}
/* Header */
.chat-header {
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 12px;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid #444444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.connection-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: normal;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ffa500;
    animation: pulse 2s infinite;
    transition: background-color 0.3s ease;
}

.connection-indicator.connected .indicator-dot {
    background-color: #4CAF50;
    animation: none;
}

.connection-indicator.disconnected .indicator-dot {
    background-color: #f44336;
    animation: pulse 1s infinite;
}

.connection-indicator.reconnecting .indicator-dot {
    background-color: #ffa500;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Messages area */
.chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: var(--background-color);
}

/* Message bubbles */
.message-bubble {
    max-width: 75%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    position: relative;
    margin: 5px 0;
}

/* Sent message styling */
.message-bubble.sent {
    align-self: flex-end;
    background-color: #0084ff;
    color: var(--text-color);
    border-bottom-right-radius: 5px;
}

/* Received message styling */
.message-bubble.received {
    align-self: flex-start;
    background-color: #f1f0f0;
    color: black;
    border-bottom-left-radius: 5px;
}

/* Chat input area */
.chat-input {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: var(--background-color);
    border-top: 1px solid #444444;
}

/* Text input */
.chat-input textarea {
    flex: 1;
    border: none;
    padding: 10px;
    font-size: 14px;
    color: var(--text-color);
    background-color: #444444;
    border-radius: 10px;
    resize: none;
    height: 40px;
    outline: none;
    margin-right: 8px;
}

/* Send button */
.chat-input button {
    background-color: #0084ff;
    color: white;
    border: none;
    padding: 10px 15px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.chat-input button:hover {
    background-color: #0073e6;
}

.view-style img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}
.header .accountsource{
    display: none;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
    max-width: 200px;
    max-height: 60px;
    box-shadow: 0 0 10px var(--chat-box-shadow);
    background-color: var(--navbar-bg);
}
.header a{
    text-decoration: none; /* Remove underline */
    color: var(--text-color);
    text-align: center;
    align-items: center;
}
.accountsource{
    position: fixed;
    top: 10px;
    left: 10px;
    transition: width 0.5s ease-in-out;
    width: 50px;
    overflow: hidden;
    z-index: 5;
}
.accountsource .link{
    margin: 10px;
    font-size: 16px;
    text-align: center;
    align-items: center;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    transition: width 0.5s ease-in-out;
    flex-wrap: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    height: 30px;
}
.accountsource .link img{
    width: 30px;
    object-fit: contain;
    transition: all 0.5s ease-in-out;
}
.accountsource:hover {
    background-color: var(--text-color);
    color: var(--background-color);
    width: 100%;
    overflow: visible;
    
}
.like-button, .dislike-button {
    margin: 5px;
    padding: 8px;
    background-color:transparent;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease-in-out;
    display: flex;
    color: var(--text-color);
}
.rate-buttons{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.like-button:hover, .dislike-button:hover {
    svg{
        fill:  var(--svg-hover);
    }
}.rate-icon{
    margin-right: 5px;

    svg{
        fill: #909090;
    }
}
.rate-icon{
    width: 20px;
}
.like-button.voted {
    svg{
        fill:  var(--svg-hover);
    }
}

.dislike-button.voted {
    svg{
        fill:  var(--svg-hover);
    }
}
/* From Uiverse.io by Type-Delta */ 
/* a clone from joshwcomeau.com 
 * but this version runs on pure CSS
 */

 .navbar .themeToggle {
    display: flex;
    width: 40px; /* Smaller size */
    height: 40px;
    margin-left: 20px; /* Adjust this to maintain spacing from other elements */
}
  
  .st-sunMoonThemeToggleBtn {
    position: relative;
    cursor: pointer;
  }
  
  .st-sunMoonThemeToggleBtn .themeToggleInput {
    opacity: 0;
    width: 100%;
    aspect-ratio: 1;
  }
  
  .st-sunMoonThemeToggleBtn svg {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease;
    transform: rotate(40deg);
  }
  
  .st-sunMoonThemeToggleBtn svg .sunMoon {
    transform-origin: center center;
    transition: inherit;
    transform: scale(1);
  }
  
  .st-sunMoonThemeToggleBtn svg .sunRay {
    transform-origin: center center;
    transform: scale(0);
  }
  
  .st-sunMoonThemeToggleBtn svg mask > circle {
    transition: transform 0.64s cubic-bezier(0.41, 0.64, 0.32, 1.575);
    transform: translate(0px, 0px);
  }
  
  .st-sunMoonThemeToggleBtn svg .sunRay2 {
    animation-delay: 0.05s !important;
  }
  .st-sunMoonThemeToggleBtn svg .sunRay3 {
    animation-delay: 0.1s !important;
  }
  .st-sunMoonThemeToggleBtn svg .sunRay4 {
    animation-delay: 0.17s !important;
  }
  .st-sunMoonThemeToggleBtn svg .sunRay5 {
    animation-delay: 0.25s !important;
  }
  .st-sunMoonThemeToggleBtn svg .sunRay5 {
    animation-delay: 0.29s !important;
  }
  
  .st-sunMoonThemeToggleBtn .themeToggleInput:checked + svg {
    transform: rotate(90deg);
  }
  .st-sunMoonThemeToggleBtn .themeToggleInput:checked + svg mask > circle {
    transform: translate(16px, -3px);
  }
  .st-sunMoonThemeToggleBtn .themeToggleInput:checked + svg .sunMoon {
    transform: scale(0.55);
  }
  .st-sunMoonThemeToggleBtn .themeToggleInput:checked + svg .sunRay {
    animation: showRay1832 0.4s ease 0s 1 forwards;
  }
  
  @keyframes showRay1832 {
    0% {
      transform: scale(0);
    }
    100% {
      transform: scale(1);
    }
  }

  
  /* Dropdown animation */
  @keyframes slideDown {
    0% {
      opacity: 0;
      max-height: 0;
    }
    100% {
      opacity: 1;
      max-height: 200px;
    }
  }
  
  
/* Media query for mobile devices */
/* Modern Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.pulse-container {
    width: 120px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pulse-bubble {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #3FF9DC;
}

.pulse-bubble-1 {
    animation: pulse 0.4s ease 0s infinite alternate;
}
.pulse-bubble-2 {
    animation: pulse 0.4s ease 0.2s infinite alternate;
}
.pulse-bubble-3 {
    animation: pulse 0.4s ease 0.4s infinite alternate;
}

@keyframes pulse {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0.2;
        transform: scale(0.8);
    }
}

/* Modern Loader Overlay */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loader-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner-box {
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circle-border {
    width: 80px;
    height: 80px;
    padding: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: linear-gradient(0deg, rgba(63, 249, 220, 0.1) 33%, rgba(63, 249, 220, 1) 100%);
    animation: spin 1.5s linear 0s infinite;
}

.circle-core {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    border-radius: 50%;
}

@keyframes spin {
    from {
        transform: rotate(0);
    }
    to {
        transform: rotate(359deg);
    }
}

.loader-text {
    color: white;
    font-size: 18px;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(63, 249, 220, 0.5);
}

/* Success notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    background-color: rgba(76, 175, 80, 0.9);
    color: white;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.error {
    background-color: rgba(244, 67, 54, 0.9);
}

.notification-icon {
    width: 24px;
    height: 24px;
}

.notification-message {
    flex: 1;
}

.notification-close {
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    margin-left: 10px;
}

/* SweetAlert2 Custom Styles for Dark/Light Theme */
.swal2-popup {
    background-color: var(--modal-bg) !important;
    border: 1px solid var(--modal-border) !important;
    box-shadow: 0 0 20px var(--chat-box-shadow) !important;
    z-index: 10001 !important; /* Above account modal */
}

.swal2-title, .swal2-html-container {
    color: var(--text-color) !important;
}

.swal2-confirm {
    background-color: #0084ff !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    transition: background-color 0.3s ease !important;
}

.swal2-confirm:hover {
    background-color: #0073e6 !important;
}

.swal2-cancel {
    background-color: rgba(244, 67, 54, 0.9) !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    transition: background-color 0.3s ease !important;
}

.swal2-cancel:hover {
    background-color: rgba(244, 67, 54, 1) !important;
}

.swal2-input {
    background-color: var(--background-color) !important;
    color: var(--text-color) !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 6px !important;
    padding: 10px 12px !important;
    font-size: 16px !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.swal2-input:focus {
    border-color: #0084ff !important;
    box-shadow: 0 0 5px rgba(0, 132, 255, 0.3) !important;
    outline: none !important;
}

.swal2-input::placeholder {
    color: var(--text-color) !important;
    opacity: 0.6 !important;
}

.swal2-validation-message {
    background-color: rgba(244, 67, 54, 0.1) !important;
    color: #f44336 !important;
    border: 1px solid #f44336 !important;
    border-radius: 6px !important;
}

.swal2-icon {
    border-color: var(--text-color) !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #4CAF50 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: #4CAF50 !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #f44336 !important;
}

.swal2-icon.swal2-warning {
    border-color: #ff9800 !important;
    color: #ff9800 !important;
}

/* Ensure SweetAlert2 container has proper z-index */
.swal2-container {
    z-index: 10001 !important; /* Above account modal which is z-index 9999 */
}



/* Dashboard button bottom center */
#dashboard-button {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: center bottom;
    background-color: var(--background-color);
    color: var(--text-color);
    border: none;
    padding: 10px 20px;
    border-radius: 18px 18px 0 0;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    font-size: larger;
    box-shadow: 0 -4px 12px var(--chat-box-shadow);
}

#dashboard-button:hover {
    transform: translateX(-50%) scale(1.1);
    background-color: var(--svg-hover);
    color: var(--background-color);
}
/* Modal overlay */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal .modal-content {
    background-color: var(--modal-bg);
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    position: relative;
}
.modal .modal-close {
    font-size: 24px;
    cursor: pointer;
}
.dashboard-stats {
    display: flex;
    justify-content: space-around;
}
.stat {
    text-align: center;
}
.count {
    font-size: 2rem;
    font-weight: bold;
}

/* Black & White Dashboard Overrides */
body:not(.dark-mode) #dashboardModal .modal-content {
    background: #ffffff !important;
    color: #000000 !important;
}
body.dark-mode #dashboardModal .modal-content {
    background: #000000 !important;
    color: #ffffff !important;
}
body:not(.dark-mode) #dashboardModal .stat {
    color: #ffffff !important;
}
body.dark-mode #dashboardModal .stat {
    color: #000000 !important;
}
body:not(.dark-mode) #dashboardModal .count {
    color: #000000 !important;
}
body.dark-mode #dashboardModal .count {
    color: #ffffff !important;
}
body:not(.dark-mode) #dashboardModal .modal-close {
    color: #000000 !important;
}
body.dark-mode #dashboardModal .modal-close {
    color: #ffffff !important;
}

/* Dashboard modal override */
#dashboardModal {
    z-index: 99999 !important;
}
#dashboardModal .modal-content {
    z-index: 100000 !important;
}

/* Welcome Modal Styles */
.welcome-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    animation: welcomeFadeIn 0.4s ease-out;
}

.welcome-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-modal-content {
    background: var(--background-color);
    border: 2px solid var(--modal-border);
    border-radius: 24px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: welcomeSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center bottom;
}

.welcome-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 16px;
    border-bottom: 1px solid var(--modal-border);
}

.welcome-icon {
    color: #3FF9DC;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3FF9DC20, #3FF9DC10);
    border-radius: 16px;
    animation: welcomeIconPulse 2s ease-in-out infinite;
}

.welcome-modal-close {
    font-size: 28px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: transparent;
}

.welcome-modal-close:hover {
    background: var(--modal-border);
    transform: scale(1.1);
    color: #ff4757;
}

.welcome-modal-body {
    padding: 28px;
}

.welcome-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 16px 0;
    text-align: center;
    background: linear-gradient(135deg, var(--text-color), #3FF9DC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-description {
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.6;
    text-align: center;
    margin: 0 0 32px 0;
}

.welcome-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--chat-box-shadow);
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-item:hover {
    transform: translateX(8px);
    border-color: #3FF9DC;
    box-shadow: 0 8px 25px rgba(63, 249, 220, 0.15);
}

.feature-icon {
    color: #3FF9DC;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3FF9DC20, #3FF9DC10);
    border-radius: 12px;
    flex-shrink: 0;
}

.feature-item span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

.welcome-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.welcome-btn-primary,
.welcome-btn-secondary {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.welcome-btn-primary {
    background: linear-gradient(135deg, #3FF9DC, #2ed3b7);
    color: #000;
    box-shadow: 0 8px 25px rgba(63, 249, 220, 0.3);
}

.welcome-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(63, 249, 220, 0.4);
}

.welcome-btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--modal-border);
}

.welcome-btn-secondary:hover {
    background: var(--modal-border);
    color: var(--background-color);
    transform: translateY(-2px);
}

.welcome-checkbox-container {
    display: flex;
    justify-content: center;
}

.welcome-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.welcome-checkbox-label:hover {
    opacity: 1;
}

.welcome-checkbox {
    display: none;
}

.welcome-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--modal-border);
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
}

.welcome-checkbox:checked + .welcome-checkmark {
    background: #3FF9DC;
    border-color: #3FF9DC;
}

.welcome-checkbox:checked + .welcome-checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.welcome-checkbox-text {
    user-select: none;
}

/* Animations */
@keyframes welcomeFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes welcomeSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes welcomeIconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .welcome-modal-content {
        width: 95%;
        margin: 20px;
        border-radius: 20px;
    }
    
    .welcome-modal-body {
        padding: 20px;
    }
    
    .welcome-title {
        font-size: 1.8rem;
    }
    
    .welcome-actions {
        flex-direction: column;
    }
    
    .feature-item:hover {
        transform: none;
    }
}

/* Dark mode specific adjustments */
body.dark-mode .welcome-modal-content {
    box-shadow: 0 25px 50px rgba(255, 255, 255, 0.1);
}

body.dark-mode .feature-item {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .feature-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Dashboard modal enhanced styling */
#dashboardModal .modal-content {
    width: 75vw !important;
    max-width: 1200px !important;
    max-height: fit-content !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden !important;
    padding: 0 !important;
}
#dashboardModal .dashboard-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 60px 40px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 20px;
}
#dashboardModal .stat {
    background: transparent;
    flex: 1 1 320px;
    min-width: 240px;
    max-width: 440px;
    min-height: 180px;
    max-height: 340px;
    margin: 10px;
    padding: 2vw 1vw;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid var(--modal-border);
}
#dashboardModal .count {
    font-size: 7rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--svg-hover);
}
#dashboardModal .stat p {
    font-size: 2.2rem;
    color: var(--text-color);
    font-weight: 500;
    margin: 0;
}

/* Animation for Dashboard modal content */
#dashboardModal .modal-content {
    transform-origin: center bottom;
    transform: scale(0);
    animation: growUp 0.3s ease-out forwards;
}
@keyframes growUp {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* Dashboard title and close button alignment */
#dashboardModal .dashboard-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--modal-border);
    padding: 15px 20px;
    width: 100%;
    box-sizing: border-box;
}
#dashboardModal .dashboard-header h2 {
    position: static !important;
    transform: none !important;
    flex: 1;
    text-align: center;
    margin: 0;
    font-size: 2rem;
    align-self: center;
}
#dashboardModal .dashboard-header .modal-close {
    align-self: flex-end;
    transform: none !important;
    margin: 0;
    font-size: 2rem;
    cursor: pointer;
}
#dashboardModal .dashboard-header .modal-close:hover {
    color: red   !important;
}
#dashboardModal .modal-content {
    padding-top: 0 !important;
}

/* Redesigned Account Modal */
#accountModal .modal-content {
    background: var(--background-color) !important;
    color: var(--text-color);
    width: 80% !important; 
    height: 80%;
    margin: auto;
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    border: 1px solid var(--modal-border);
    padding: 0 !important;
}
#accountModal .account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--modal-border);
}
#accountModal .account-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}
#accountModal .account-header .modal-close {
    font-size: 3rem;
    cursor: pointer;
}
#accountModal .account-body {
    flex: 1;
    display: flex;
    overflow-x: hidden; /* prevent content overflow */
}
#accountModal .account-image-container {
    flex: 0 0 260px; /* slightly wider for description */
    width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 10px;
    border-right: 1px solid var(--modal-border);
    box-sizing: border-box;
}
#accountModal .game-description-container {
    width: 100%;
    margin-top: 18px;
    padding: 14px 10px;
    background: rgba(0,0,0,0.04);
    box-shadow: 0 1px 6px 0 rgba(0,0,0,0.03);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 60px;
    border-top: 1.5px solid var(--modal-border);
}
#accountModal .modal-game-image {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    display: block;
    margin: 16px auto 0;
}
#accountModal .game-description-container {
    width: 100%;
    margin-top: 18px;
    padding: 14px 10px;
    background: rgba(0,0,0,0.04);
    box-shadow: 0 1px 6px 0 rgba(0,0,0,0.03);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 60px;
}
#accountModal .game-description-container h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: var(--primary);
    letter-spacing: 0.5px;
}
#accountModal .game-description-container p#modal-description {
    font-size: 1rem;
    color: var(--text-muted, #888);
    font-style: italic;
    opacity: 0.8;
    margin: 0;
    padding: 0;
}

#accountModal .game-description-container p#modal-description.has-description {
    color: #28a745;
    font-style: normal;
    opacity: 1;
}
#accountModal .account-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: 16px auto 0; /* top center */
}

/* Risk Warning Alert */
.risk-warning-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin: 16px;
    background: rgba(255, 107, 107, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ff4757;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.3);
    animation: pulseWarning 2s ease-in-out infinite;
}

.risk-warning-alert i {
    font-size: 1.1rem;
    color: #ff4757;
    filter: drop-shadow(0 1px 2px rgba(255, 71, 87, 0.3));
}

.risk-warning-alert span {
    flex: 1;
    text-shadow: 0 1px 2px rgba(255, 71, 87, 0.2);
}

@keyframes pulseWarning {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
    }
}

/* Dark mode adjustments */
body.dark-mode .risk-warning-alert {
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b7a;
    border: 1px solid rgba(220, 53, 69, 0.4);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

body.dark-mode .risk-warning-alert i {
    color: #ff6b7a;
    filter: drop-shadow(0 1px 2px rgba(255, 107, 122, 0.3));
}

body.dark-mode .risk-warning-alert span {
    text-shadow: 0 1px 2px rgba(255, 107, 122, 0.2);
}

/* Learn More Button */
.learn-more-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 71, 87, 0.4);
    color: #ff4757;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.learn-more-btn:hover {
    background: rgba(255, 71, 87, 0.1);
    border-color: rgba(255, 71, 87, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 71, 87, 0.2);
}

.learn-more-btn i {
    font-size: 0.8rem;
}

body.dark-mode .learn-more-btn {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 107, 122, 0.4);
    color: #ff6b7a;
}

body.dark-mode .learn-more-btn:hover {
    background: rgba(255, 107, 122, 0.1);
    border-color: rgba(255, 107, 122, 0.6);
    box-shadow: 0 4px 8px rgba(255, 107, 122, 0.2);
}







/* Safety Guide Modal */
#safetyGuideModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.safety-modal-content {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--modal-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--modal-border);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin: auto;
}

.safety-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--modal-border);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(25, 135, 84, 0.1));
    border-radius: 16px 16px 0 0;
}

.safety-header h2 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.safety-header i {
    color: #28a745;
    font-size: 1.2rem;
}

.safety-body {
    padding: 24px;
}

.safety-intro {
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.safety-intro p {
    margin: 0;
    color: var(--text-color);
    font-weight: 500;
}

.safety-steps {
    margin-bottom: 24px;
}

.safety-step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(var(--text-color), 0.05);
    border-radius: 12px;
    border: 1px solid rgba(var(--text-color), 0.1);
    transition: all 0.3s ease;
}

.safety-step:hover {
    background: rgba(var(--text-color), 0.08);
    transform: translateX(4px);
}

.step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.step-content h3 {
    margin: 0 0 8px 0;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.step-content p {
    margin: 0;
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.5;
}

.warning-note {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 6px;
    border-left: 3px solid #ffc107;
    display: flex;
    align-items: center;
    gap: 8px;
}

.warning-note i {
    color: #ffc107;
    font-size: 0.9rem;
}

.warning-note span {
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 500;
}

.safety-footer {
    padding-top: 20px;
    border-top: 1px solid var(--modal-border);
}

.additional-tips h4 {
    margin: 0 0 16px 0;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.additional-tips h4::before {
    content: "💡";
    font-size: 1rem;
}

.additional-tips ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-color);
}

.additional-tips li {
    margin-bottom: 8px;
    line-height: 1.5;
    opacity: 0.9;
}

/* Dark mode adjustments for safety modal */
body.dark-mode .safety-header {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15), rgba(25, 135, 84, 0.15));
}

body.dark-mode .safety-intro {
    background: rgba(40, 167, 69, 0.15);
}

body.dark-mode .warning-note {
    background: rgba(255, 193, 7, 0.15);
}

#accountModal .account-list-container {
    flex: 1 1 0;
    min-width: 0;
    overflow-y: auto;
    padding: 16px;
}
#accountModal .game-comments-container {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-left: 1.5px solid var(--modal-border);
    min-height: 100%;
    box-sizing: border-box;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.04);
    overflow-y: auto;
}

#accountModal .comments-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding: 10px;
    color: var(--text-color);
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

#accountModal .comments-section {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    border-top: solid 1px var(--modal-border);
    border-bottom: solid 1px var(--modal-border);
}

#accountModal .comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

#accountModal .add-comment-section {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    align-items: center;
}

#accountModal .add-comment-section textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.9rem;
    resize: none;
    min-height: 60px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#accountModal.add-comment-section textarea::placeholder {
    color: var(--text-color);
    opacity: 0.6;
}
#accountModal.add-comment-section textarea:focus {
    outline: none;
    border-color: #0084ff;
    box-shadow: 0 0 0 2px rgba(0, 132, 255, 0.1);
}

#accountModal .add-comment-section textarea:focus {
    outline: none;
    border-color: #0084ff;
    box-shadow: 0 0 0 2px rgba(0, 132, 255, 0.1);
}

#accountModal .add-comment-btn {
    padding: 12px;
    background-color:var(--background-color);
    color: var(--text-color);
    border: solid 1px var(--input-border);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    flex-shrink: 0;
}

#accountModal .add-comment-btn:hover {
    background-color: var(--text-color);
}

#accountModal .add-comment-btn:hover::before {
    color: var(--background-color);
}

#accountModal .add-comment-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#accountModal .add-comment-btn::before {
    content: "\f1d8";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 16px;
    color: var(--text-color);
}

#accountModal .comments-loading {
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
    font-style: italic;
    padding: 20px;
}

#accountModal .comment-item {
    padding: 12px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.02);
    transition: background-color 0.2s ease;
}

body.dark-mode #accountModal .comment-item {
    background-color: rgba(255, 255, 255, 0.02);
}

#accountModal .comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

#accountModal .comment-username {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

#accountModal .comment-time {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.6;
}

#accountModal .comment-content {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

#accountModal .no-comments {
    text-align: center;
    color: var(--text-color);
    opacity: 0.6;
    font-style: italic;
    padding: 20px;
}
#accountModal .account-list-container table {
    width: 100%;
    border-collapse: collapse;
}
#accountModal .account-list-container th,
#accountModal .account-list-container td {
    padding: 8px;
    border-bottom: 1px solid var(--input-border);
}
.notification-button {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-color);
    font-size: 1.7rem;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    cursor: pointer;
    position: relative;
    z-index: 10001;
}
.notification-button:hover {
    color: green;
}
.notification-button svg {
    fill: currentColor;
}
.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-sizing: border-box;
    border: 2px solid var(--bg-color, #fff);
}
.notification-box {
    display: none;
    position: fixed;
    width: 520px;
    max-width: 90vw;
    max-height: 600px;
    background: var(--modal-bg, #fff);
    color: var(--text-color, #222);
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.18);
    z-index: 10010;
    overflow: hidden;
    border: 1px solid var(--modal-border, #e0e0e0);
    animation: fadeIn 0.22s;
}
.notification-box.active {
    display: block;
}
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid var(--modal-border, #e0e0e0);
    background: var(--background-color, #f9f9f9);
    font-size: 1.18rem;
    font-weight: 600;
}
.notification-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color, #888);
    margin-left: 10px;
}
.notification-tiles {
    padding: 18px 18px 12px 18px;
    max-height: 480px;
    overflow-y: auto;
}
.notification-tile {
    background: var(--input-bg, #fff);
    border-radius: 8px;
    box-shadow: 0 1px 8px 0 rgba(0,0,0,0.03);
    padding: 18px 14px 14px 14px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-left: 4px solid var(--svg-hover, #222);
}
.notification-tile.coming-soon {
    border-left: 4px dashed var(--modal-border, #aaa);
    background: linear-gradient(90deg, var(--modal-bg, #fff) 60%, var(--background-color, #f4f4f4));
}
.notification-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary, #2c3e50);
}
.notification-desc {
    font-size: 1rem;
    color: var(--text-muted, #888);
    margin-top: 4px;
    font-style: italic;
}

.notification-time {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-top: 6px;
    font-weight: 500;
}

/* Light mode notification styles */
.notification-tile.game-notification {
    border-left: 4px solid #4CAF50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05), rgba(76, 175, 80, 0.02));
}

.notification-tile.account-notification {
    border-left: 4px solid #2196F3;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05), rgba(33, 150, 243, 0.02));
}

.notification-tile.game-notification .notification-title {
    color: #4CAF50;
    font-weight: 600;
}

.notification-tile.account-notification .notification-title {
    color: #2196F3;
    font-weight: 600;
}

/* Dark mode notification styles */
body.dark-mode .notification-tile.game-notification {
    border-left: 4px solid #66BB6A;
    background: linear-gradient(135deg, rgba(102, 187, 106, 0.15), rgba(102, 187, 106, 0.05));
}

body.dark-mode .notification-tile.account-notification {
    border-left: 4px solid #42A5F5;
    background: linear-gradient(135deg, rgba(66, 165, 245, 0.15), rgba(66, 165, 245, 0.05));
}

body.dark-mode .notification-tile.game-notification .notification-title {
    color: #81C784;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(129, 199, 132, 0.3);
}

body.dark-mode .notification-tile.account-notification .notification-title {
    color: #64B5F6;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(100, 181, 246, 0.3);
}

/* Sparky game name styling */
.notification-description strong {
    background: linear-gradient(45deg, #FF6B35, #F7931E, #FFD23F, #06FFA5, #4ECDC4, #45B7D1);
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: sparkle 3s ease-in-out infinite;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

body.dark-mode .notification-description strong {
    background: linear-gradient(45deg, #FF8A65, #FFB74D, #FFF176, #81C784, #4DD0E1, #64B5F6);
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: sparkle 3s ease-in-out infinite;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(255, 138, 101, 0.4);
}

@keyframes sparkle {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media only screen and (max-width: 768px) {
    /* Hide all elements except .view-style */
    body > *:not(.header) {
        display: none;
    }

    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .header .accountsource {
        display: block;
        z-index: 1;
        position: fixed;
        top: 25%;
        left: 15%;
    }

    .header .view-style {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        max-height: 70%;
        text-align: center;
        padding: 20px;
    }
    .view-style h2{
        display: block;
    }
    .navbar > *:not(.themeToggle){
        display: none;
    }
    #accountModal .modal{
      display: none;
    }
    .navbar{
        position: absolute;
        top: 25%;
        left: 80%;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 60px;
        background-color: transparent;
        box-shadow: none;
        backdrop-filter: blur(0);
        -webkit-backdrop-filter: blur(0);
        z-index: 1000;
    }
}
@media only screen and (max-width: 1060px) {
  .account-item{
    flex-direction: column;
  }
}

/* Menu Box Styles - Similar to Chat Box */
.menu-button {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: var(--navbar-bg);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    box-shadow: 0 0 10px var(--chat-box-shadow);
    transition: all 0.3s ease-in-out;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.menu-button:hover {
    background-color: var(--text-color);
    color: var(--background-color);
    transform: scale(1.1);
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.3s ease;
}

.hamburger-icon span {
    width: 20px;
    height: 2px;
    background-color: currentColor;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.menu-button.active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-button.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.menu-button.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.menu-box {
    position: fixed;
    top: 100px;
    left: -450px;
    width: 400px;
    height: fit-content;
    background-color: var(--chat-bg);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--chat-box-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    opacity: 0;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-box.active {
    left: 20px;
    opacity: 1;
}

.menu-header {
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 15px;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.menu-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: var(--background-color);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background-color: var(--chat-input-bg);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    backdrop-filter: blur(5px);
}

.menu-item:hover {
    background-color: var(--text-color);
    color: var(--background-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.menu-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.menu-item span {
    flex: 1;
}
.sort-accordion .menu-item{
  width: 100%;
}
/* Sort Accordion */
.sort-accordion {
    width: 100%;
}

.sort-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
}

#sort-menu-button.active .sort-arrow {
    transform: rotate(180deg);
}

.sort-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    background-color: var(--background-color);
    border-radius: 0 0 10px 10px;
    margin-top: -10px;
    padding-top: 10px;
}

.sort-accordion-content.active {
    max-height: 200px;
}

.sort-accordion-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-color);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.sort-accordion-item:hover {
    background: var(--chat-input-bg);
    border-left-color: var(--accent-color);
}

.sort-accordion-item.active {
    background: var(--chat-input-bg);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    font-weight: 600;
}

.sort-accordion-item.active::before {
    content: '✓';
    position: absolute;
    right: 20px;
    font-size: 12px;
    color: var(--accent-color);
}

.sort-accordion-item span {
    flex: 1;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .menu-box {
        width: calc(100vw - 40px);
        max-width: 350px;
        height: 400px;
    }
    
    .menu-button {
        width: 50px;
        height: 50px;
    }
    
    .hamburger-icon span {
        width: 16px;
    }
}