/* Add at the start of the file, before other styles */
* {
    cursor: none;
}

.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #DD2476;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.15s ease-out;
    transform-origin: center center;
}

.custom-cursor.clicking {
    transform: translate(-50%, -50%) scale(0.7);
    background: rgba(221, 36, 118, 0.3);
}

.cursor-dot {
    width: 4px;
    height: 4px;
    background: #DD2476;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.15s ease-out;
}

.cursor-dot.clicking {
    transform: translate(-50%, -50%) scale(2);
}

/* Add hover effects for interactive elements */
button:hover ~ .custom-cursor,
a:hover ~ .custom-cursor,
input:hover ~ .custom-cursor,
.switch:hover ~ .custom-cursor {
    transform: scale(1.5);
    background: rgba(221, 36, 118, 0.1);
}

/* Dark mode cursor */
body.dark-mode .custom-cursor {
    border-color: #FFFF00;
}

body.dark-mode .cursor-dot {
    background: #FFFF00;
}

body.dark-mode .custom-cursor.clicking {
    background: rgba(255, 255, 0, 0.3);
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(45deg, #1a2a6c, #b21f1f, #fdbb2d);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    margin: 0;
}

body.dark-mode {
    background: linear-gradient(45deg, #000428, #004e92);
    background-size: 200% 200%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#game-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

body.dark-mode #game-container {
    background-color: #808080; /* Gray */
}

#letter-input {
    font-size: 1.2em;
    padding: 5px;
    margin: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #DD2476;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 1.2em;
    outline: none;
    transition: all 0.3s ease;
}

#letter-input:focus {
    box-shadow: 0 0 15px rgba(221, 36, 118, 0.4);
}

body.dark-mode #game-container, 
body.dark-mode #letter-input, 
body.dark-mode #guess-button, 
body.dark-mode #restart-button, 
body.dark-mode .figure-container, 
body.dark-mode .figure-part {
    color: #FFFF00; /* Yellow */
    border-color: #FFFF00; /* Yellow */
}

body.dark-mode .figure-container {
    stroke: #FFFF00;
}

body.dark-mode #head {
    stroke: #FFFF00;
}

body.dark-mode #body,
body.dark-mode #left-arm,
body.dark-mode #right-arm,
body.dark-mode #left-leg,
body.dark-mode #right-leg {
    stroke: #FFFF00;
}

body.dark-mode #letter-input,
body.dark-mode #guess-button,
body.dark-mode #restart-button {
    background-color: #808080;
    color: #FFFF00;
    border-color: #FFFF00;
}

body.dark-mode h1,
body.dark-mode #winning-streak,
body.dark-mode #word-display,
body.dark-mode #wrong-guesses {
    color: #FFFF00;
}

#guess-button {
    font-size: 1.2em;
    padding: 5px 10px;
    transition: transform 0.1s;
    background: linear-gradient(45deg, #FF512F, #DD2476);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

#guess-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

#guess-button:active {
    transform: scale(0.95);
}

#restart-button {
    font-size: 1.2em;
    padding: 5px 10px;
    margin-top: 10px;
    transition: transform 0.1s;
    background: linear-gradient(45deg, #FF512F, #DD2476);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

#restart-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

#restart-button:active {
    transform: scale(0.95);
}

.figure-container {
    margin: 20px auto;
    stroke: #000;
    stroke-width: 4;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.3));
}

.figure-part {
    display: none;
}

#head {
    fill: none;
    stroke: #000;
}

#body, #left-arm, #right-arm, #left-leg, #right-leg {
    stroke: #000;
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

#message {
    font-size: 2.5em;
    font-weight: bold;
    background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
    background-size: 400%;
    -webkit-background-clip: text;
    color: transparent;
    animation: rainbow 3s linear infinite, bounce 2s ease-in-out infinite;
    position: relative;
    top: 0;  /* Reset position */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

body.dark-mode #message {
    background: linear-gradient(90deg, yellow, yellow, yellow, yellow, yellow, yellow, yellow);
    -webkit-background-clip: text;
    color: transparent;
}

#message.lost {
    color: red;
    font-size: 1.5em;
}

body.dark-mode #message.lost {
    color: yellow;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

h1 {
    font-size: 3.5em;
    background: linear-gradient(45deg, #FF512F, #DD2476, #FF512F);
    -webkit-background-clip: text;
    color: transparent;
    animation: gradient 3s ease infinite;
    background-size: 200% auto;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#winning-streak {
    font-size: 1.8em;
    font-weight: bold;
    color: #DD2476;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

#theme-toggle-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;  /* Reduced from 60px */
    height: 24px;  /* Reduced from 34px */
}

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

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

.slider:before {
    position: absolute;
    content: "";
    height: 16px;  /* Reduced from 26px */
    width: 16px;  /* Reduced from 26px */
    left: 4px;
    bottom: 4px;
    background-color: black;  /* Changed from white */
    border: none;  /* Removed outline */
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #D3D3D3;  /* Changed to light gray */
    border: 1px solid black;  /* Added black border */
}

input:checked + .slider:before {
    transform: translateX(16px);  /* Reduced from 26px */
    background-color: white;  /* Added for dark mode */
    border: none;  /* No outline for circle in dark mode */
}

.small-text {
    font-size: 0.8em;
    color: #555;
    margin: -20px 0 10px 0;  /* Increased negative top margin from -15px to -20px */
}

body.dark-mode .small-text {
    color: #FFFF00;  /* Make text yellow in dark mode */
}

/* Add these styles at the end of the file */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    text-align: center;
}

body.dark-mode .modal-content {
    background: rgba(128, 128, 128, 0.9);
    color: #FFFF00;
}

#name-input {
    font-size: 1.2em;
    padding: 10px 20px;
    margin: 10px;
    border-radius: 25px;
    border: 2px solid #DD2476;
    outline: none;
    width: 80%;
}

body.dark-mode #name-input {
    background-color: #808080;
    color: #FFFF00;
    border-color: #FFFF00;
}

#submit-name {
    font-size: 1.2em;
    padding: 10px 20px;
    margin-top: 10px;
    background: linear-gradient(45deg, #FF512F, #DD2476);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    text-transform: uppercase;
}

body.dark-mode #submit-name {
    background: #808080;
    color: #FFFF00;
    border: 2px solid #FFFF00;
}

/* Add these styles at the end of the file */
#leaderboard-button {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.5em;
    padding: 10px 15px;
    background: linear-gradient(45deg, #FF512F, #DD2476);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#leaderboard-button:hover {
    transform: scale(1.1);
}

body.dark-mode #leaderboard-button {
    background: #808080;
    border: 2px solid #FFFF00;
}

#leaderboard-content {
    margin: 20px 0;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
}

.rank {
    font-weight: bold;
    margin-right: 10px;
}

.player-name {
    flex-grow: 1;
    text-align: left;
    margin: 0 10px;
}

.trophy-count {
    font-weight: bold;
}

#current-player-rank {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(221, 36, 118, 0.3);
}

body.dark-mode .leaderboard-entry {
    background: rgba(255,255,0,0.1);
}

#close-leaderboard {
    font-size: 1.2em;
    padding: 10px 20px;
    background: linear-gradient(45deg, #FF512F, #DD2476);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 15px;
}

body.dark-mode #close-leaderboard {
    background: #808080;
    color: #FFFF00;
    border: 2px solid #FFFF00;
}

/* Add these styles at the end of the file */
.leaderboard-entry.current-player {
    background: rgba(221, 36, 118, 0.1);
    border: 2px solid #DD2476;
}

body.dark-mode .leaderboard-entry.current-player {
    background: rgba(255, 255, 0, 0.15);
    border: 2px solid #FFFF00;
}

/* Add these styles at the end of the file */
.leaderboard-separator {
    text-align: center;
    color: #DD2476;
    font-size: 1.2em;
    margin: 10px 0;
    opacity: 0.7;
}

body.dark-mode .leaderboard-separator {
    color: #FFFF00;
}

/* Add auth styles */
#login-form, #signup-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#login-form input, #signup-form input {
    font-size: 1.2em;
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid #DD2476;
    outline: none;
    width: 80%;
    margin: 0 auto;
}

#login-button, #signup-button {
    font-size: 1.2em;
    padding: 10px 20px;
    background: linear-gradient(45deg, #FF512F, #DD2476);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    width: 60%;
    margin: 10px auto;
}

#auth-modal a {
    color: #DD2476;
    text-decoration: none;
    cursor: pointer;
}

body.dark-mode #login-form input,
body.dark-mode #signup-form input {
    background-color: #808080;
    color: #FFFF00;
    border-color: #FFFF00;
}

body.dark-mode #login-button,
body.dark-mode #signup-button {
    background: #808080;
    color: #FFFF00;
    border: 2px solid #FFFF00;
}

body.dark-mode #auth-modal a {
    color: #FFFF00;
}

/* Updated Loading Screen Styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
    overflow: hidden;
}

.loading-screen::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, #1a237e 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, #b71c1c 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, #311b92 0%, transparent 50%);
    opacity: 0.6;
    animation: shiftBackground 10s ease-in-out infinite;
}

.loading-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.loading-title {
    font-size: 6em;
    font-weight: bold;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 12px;
    position: relative;
    margin-bottom: 10px;
    text-shadow: 
        0 0 20px rgba(255,255,255,0.5),
        0 0 40px rgba(255,255,255,0.3);
}

.loading-author {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1em;
    letter-spacing: 3px;
    margin-bottom: 30px;
    font-style: italic;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

@keyframes shiftBackground {
    0%, 100% { 
        transform: scale(1); 
        filter: hue-rotate(0deg);
    }
    50% { 
        transform: scale(1.1); 
        filter: hue-rotate(30deg);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

body.dark-mode .loading-screen {
    background: #000000;
}

/* Shop Styles */
#shop-button {
    position: absolute;
    top: 20px;
    left: 80px; /* Position after leaderboard button */
    font-size: 1.5em;
    padding: 10px 15px;
    background: linear-gradient(45deg, #FF512F, #DD2476);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#shop-button:hover {
    transform: scale(1.1);
}

.shop-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.shop-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    text-align: center;
    max-height: 60vh;
    overflow-y: auto;
}

.token-balance {
    font-size: 1.5em;
    margin: 20px 0;
    color: #DD2476;
    font-weight: bold;
}

.exchange-rate {
    font-size: 1.2em;
    color: #666;
    margin: 10px 0;
}

#exchange-button {
    font-size: 1.2em;
    padding: 10px 20px;
    background: linear-gradient(45deg, #FF512F, #DD2476);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    margin: 20px 0;
}

/* Dark mode shop styles */
body.dark-mode #shop-button {
    background: #808080;
    border: 2px solid #FFFF00;
}

body.dark-mode .shop-content {
    background: rgba(128, 128, 128, 0.9);
    color: #FFFF00;
}

body.dark-mode .token-balance {
    color: #FFFF00;
}

body.dark-mode .exchange-rate {
    color: #DDD;
}

body.dark-mode #exchange-button {
    background: #808080;
    color: #FFFF00;
    border: 2px solid #FFFF00;
}

/* Add these styles at the end of the file */
.shop-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #ccc;
}

.lifer-indicator {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    color: red;
    z-index: 1;
}

.santa-hat {
    color: red;
    font-size: 20px;
    margin-right: 10px;
}