/* Base Reset */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Arial', sans-serif; }
body { background-color: #121212; color: #fff; min-height: 100vh; overflow-x: hidden; }
.hidden { display: none !important; }

/* Container & Typography */
.container { max-width: 1200px; margin: 0 auto; padding: 15px; width: 100%; }
h2, h3 {  letter-spacing: 1px; }

/* Auth Section */
#auth-section { max-width: 400px; margin: 10vh auto; background: #1e1e1e; padding: 30px; border-radius: 12px; text-align: center; border: 1px solid #333; }
input { width: 100%; padding: 15px; margin: 10px 0; border-radius: 8px; border: 1px solid #444; background: #2a2a2a; color: white; font-size: 16px; }
.link { display: block; margin-top: 15px; color: #3498db; cursor: pointer; }

/* Layout Grid */
.main-layout { display: flex; gap: 20px; flex-direction: row; align-items: flex-start; }

/* Game Area (The Green Table) */
.game-area { 
    flex: 3; 
    background: radial-gradient(circle, #0a6c38 0%, #054020 100%); 
    border: 10px solid #402103; 
    border-radius: 20px; 
    padding: 20px; 
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5), 0 10px 30px rgba(0,0,0,0.5);
    min-height: 80vh;
}

/* Header & Stats */
.table-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid rgba(255,255,255,0.2); padding-bottom: 10px; margin-bottom: 10px; }
.stats-bar { display: flex; justify-content: space-around; background: rgba(0,0,0,0.3); padding: 8px; border-radius: 8px; font-size: 0.9em; margin-bottom: 20px; }

/* Cards Layout */
.dealer-section, .player-section { margin-bottom: 20px; text-align: center; }
.cards { display: flex; gap: 10px; justify-content: center; min-height: 120px; margin-top: 10px; flex-wrap: wrap; }

/* Playing Cards */
/* Base card style (Black by default) */
.card {
    width: 75px;
    height: 110px;
    background: white;
    color: #1a1a1a; /* Dark black/gray */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: bold;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    border: 1px solid #ccc;
    transition: transform 0.2s;
}

/* Red class for Hearts and Diamonds */
.card.red {
    color: #e74c3c; /* A nice casino red */
}

/* Black class for Spades and Clubs */
.card.black {
    color: #2c3e50; /* Deep black/blue */
}

/* Styling for the hidden dealer card */
.hidden-card {
    background: repeating-linear-gradient(
        45deg,
        #2c3e50,
        #2c3e50 10px,
        #34495e 10px,
        #34495e 20px
    );
    color: white !important;
    border: 2px solid #ecf0f1;
}

/* Messages */
.message { height: 30px; font-size: 1.2rem; font-weight: bold; color: #f1c40f; text-align: center; margin: 15px 0; text-shadow: 1px 1px 5px rgba(0,0,0,0.8); }

/* Buttons & Controls */
.controls, .bet-actions { display: flex; justify-content: center; gap: 15px; margin-top: 15px; flex-wrap: wrap; }
button { cursor: pointer; border: none; border-radius: 8px; font-weight: bold; text-transform: uppercase; padding: 12px 20px; transition: 0.2s; font-size: 16px; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-action { background: #2980b9; color: white; flex: 1; max-width: 150px; }
.btn-action.deal { background: #27ae60; }
.btn-action.stand { background: #c0392b; }
.btn-secondary { background: #555; color: white; padding: 5px 10px; }

/* Betting Area */
.betting-area { background: rgba(0,0,0,0.4); padding: 15px; border-radius: 12px; text-align: center; margin-top: 20px; }
.current-bet-display { font-size: 1.2rem; margin-bottom: 15px; color: #f1c40f; }
.chips-container { display: flex; justify-content: center; gap: 15px; margin-bottom: 15px; }
.chip { 
    width: 60px; height: 60px; border-radius: 50%; background: #ecf0f1; color: #2c3e50; 
    border: 5px dashed #e74c3c; font-size: 1.1rem; padding: 0; box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}
.chip:nth-child(2) { border-color: #3498db; }
.chip:nth-child(3) { border-color: #9b59b6; background: #333; color: white; }

/* Sidebar Leaderboard */
.sidebar { flex: 1; background: #1e1e1e; padding: 20px; border-radius: 12px; border: 1px solid #333; }
.sidebar h3 { border-bottom: 2px solid #333; padding-bottom: 10px; margin-bottom: 10px; text-align: center; }
#leaderboard-list li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #333; font-size: 0.95rem; }
#leaderboard-list li span:last-child { color: #2ecc71; font-weight: bold; }

.cards {
    display: flex;
    flex-wrap: wrap; /* Allows cards to wrap to a new line on small screens */
    justify-content: center;
    gap: 10px;
}

input:focus {
    outline: 2px solid #27ae60;
    background-color: #333;
}

/* Ensure the auth section is centered and takes up space on mobile */
#auth-section {
    width: 90%;
    max-width: 400px;
    margin: 15vh auto;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
/* =========================================
   MOBILE RESPONSIVENESS (Phones & Tablets) 
   ========================================= */
@media (max-width: 900px) {
    .main-layout { flex-direction: column; } /* Stack elements vertically */
    .game-area { width: 100%; border-width: 5px; padding: 10px; min-height: auto; }
    .sidebar { width: 100%; margin-top: 20px; }
    .card { width: 60px; height: 85px; font-size: 1.3rem; } /* Smaller cards */
    .chip { width: 50px; height: 50px; font-size: 1rem; }
    .btn-action { max-width: 100%; } /* Full width buttons */
}

.user-msg-container {
    margin-top: 20px;
    padding: 15px;
    background: rgba(52, 152, 219, 0.1); /* Subtle blue tint */
    border-left: 4px solid #3498db;     /* Professional accent line */
    border-radius: 4px;
    text-align: left;
}

#pNamePara {
    display: block;
    font-weight: 500;
    line-height: 1.6;
    word-wrap: break-word; /* Prevents text overflow on narrow screens */
}

/* Mobile Tweak: On small screens, give it more breathing room */
@media (max-width: 900px) {
    .user-msg-container {
        margin-bottom: 20px; /* Space before the logout button */
    }
    #pNamePara {
        font-size: 1rem; /* Slightly larger text for mobile readability */
    }
}

/* The Footer Bar */
.footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: #1a1a1a;
    border-top: 1px solid #333;
    display: flex;
    align-items: center;
    z-index: 9999; /* Ensures it stays above the game table */
    font-size: 0.8rem;
    color: #888;
}

.footer-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-online {
    color: #2ecc71;
    font-weight: bold;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    margin-left: 15px;
}

.footer-links a:hover {
    color: #fff;
}

.link1 {
  color: #888;
    text-decoration: none;
    margin-left: 15px;
    cursor: pointer; /* Makes the mouse turn into a hand */
    transition: color 0.2s; /* Makes the hover look smooth */
}

.link1:hover {
    color: #fff;
}

/* IMPORTANT: Prevent content from being hidden behind the footer */
#auth-section, .main-layout {
    margin-bottom: 60px; /* Gives space so footer doesn't cover buttons */
}

/* Mobile Tweak */
@media (max-width: 600px) {
    .footer-links {
        display: none; /* Hide links on very small phones to save space */
    }
}

/* styles.css */
.meter-container {
    width: 100%;
    margin-top: 5px;
    margin-bottom: 10px;
    text-align: left;
}

#strength-bar {
    height: 5px;
    width: 0%;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

#strength-text {
    font-size: 0.75rem;
    color: #888;
    margin-top: 4px;
    display: block;
}

/* Colors for the bar */
.weak { background-color: #e74c3c; width: 33%; }
.medium { background-color: #f1c40f; width: 66%; }
.strong { background-color: #2ecc71; width: 100%; }

/* The animation keyframes */
@keyframes dealCard {
    0% {
        opacity: 0;
        transform: translateY(-150px) translateX(-150px) rotate(15deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) translateX(0) rotate(0deg);
    }
}

/* Apply this class to new cards */
.card-animate {
    animation: dealCard 0.4s ease-out forwards;
}

/* Base card styling (ensure overflow is handled in the container) */
.cards-container {
    display: flex;
    gap: 10px;
    min-height: 120px;
    padding: 10px;
    overflow-x: auto;
}

.auto-reload-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.reload-label {
    font-size: 0.85rem;
    color: #ccc;
}

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #444;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px; width: 16px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider { background-color: #2ecc71; }
input:checked + .slider:before { transform: translateX(18px); }


.intro-box {
    margin-top: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03); /* Subtle dark contrast */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: left; /* Better for reading lists */
}

.intro-box h3 {
    color: #f1c40f; /* Gold for the welcome header */
    margin-bottom: 10px;
}

.intro-box p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #ccc;
}

.intro-box ul {
    margin: 15px 0;
    padding-left: 20px;
    color: #eee;
    font-size: 0.85rem;
}

.signup-hook {
    font-style: italic;
    color: #2ecc71 !important; /* Green to encourage signups */
    margin-top: 10px;
}

#privacy-section {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    color: #eee;
    text-align: left;
}

.policy-content h3 {
    color: #f1c40f;
    margin-top: 20px;
}

.policy-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ccc;
}

.back-btn {
    background: none;
    border: 1px solid #f1c40f;
    color: #f1c40f;
    padding: 5px 15px;
    cursor: pointer;
    margin-bottom: 20px;
    border-radius: 5px;
}

/* Container to provide breathing room from the box edge */
.custom-para {
  padding: 1em;
  color: rgb(208, 208, 208);
  font-size: 1.1em;

}

/* Specific list styling */
.custom-list {
    border: 1px solid #00ff11; /* Optional: just to see the boundary */

  
  border-radius: 1em;           /* Makes it "soft" and rounded */
  padding: 5%;                 /* Generous spacing inside */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Soft depth effect */
    font-weight: 600;              /* Semi-bold is usually "softer" than full 700 bold */
  color: #2d2d2d;                /* Dark grey is easier on the eyes than pure black */
  line-height: 1.4;
}

/* Individual item styling */
.custom-list-item {
  margin-bottom: 5px;
  color: #ffffff;
  
  
}

.bottom-para {
font-weight: 600;
  color: #00ff2f;
}

.welcome-line {
    margin: 0 0 10px 0;       /* Removes top margin to hit the top edge, keeps a tiny bit of bottom space */
  font-size: 1.5rem;        /* Balanced size */
  font-weight: 800;         /* Extra bold for that "emboldened" look */
  color: #d9fffb;          
  letter-spacing: -0.5px;   /* Tightens the letters for a high-end editorial look */
  line-height: 1.1;         /* Reduces vertical space around the text */
}

/* The Highlighted Span */
.highlight-text {
  font-size: 1.1em;             /* Makes it slightly bigger than the surrounding text */
  color: #000000;               /* A nice "Electric Blue" or choose your brand color */
  background-color: #00ff1e89;    
  padding: 2px 6px;             /* Adds a little "breathing room" inside the highlight */
  border-radius: 4px;           /* Rounds the edges of the highlight marker */
  display: inline-block;        /* Ensures padding and height behave correctly */
  line-height: 1;               /* Keeps the highlight from overlapping lines */
}