:root {
    --bg-primary: #000000;
    --bg-secondary: #111111;
    --bg-tertiary: #222222;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.4);
    --border-primary: rgba(255, 255, 255, 0.1);
    --border-secondary: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(0, 0, 0, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --hover-bg: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #e9ecef;
    --bg-tertiary: #dee2e6;
    --text-primary: #212529;
    --text-secondary: rgba(33, 37, 41, 0.7);
    --text-muted: rgba(33, 37, 41, 0.5);
    --border-primary: rgba(33, 37, 41, 0.15);
    --border-secondary: rgba(33, 37, 41, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(33, 37, 41, 0.1);
    --hover-bg: rgba(33, 37, 41, 0.05);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', monospace;
    background: radial-gradient(ellipse at center, #0a0a0a 0%, #000000 70%);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    position: relative;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 300;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 40%, rgba(80, 80, 120, 0.12) 0%, transparent 60%),
        radial-gradient(circle at 75% 20%, rgba(120, 80, 100, 0.1) 0%, transparent 60%),
        radial-gradient(circle at 45% 85%, rgba(100, 120, 80, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

[data-theme="light"] body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100%);
}

[data-theme="light"] body::before {
    background: 
        radial-gradient(circle at 20% 30%, rgba(74, 144, 226, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(245, 101, 101, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(52, 211, 153, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 60% 60%, rgba(168, 85, 247, 0.04) 0%, transparent 50%);
    animation: gradient-shift 15s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

[data-theme="light"] .container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .menu-container,
[data-theme="light"] .saved-parties-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .particle {
    background: rgba(74, 144, 226, 0.3);
    animation: float-particle-light 10s infinite linear;
}

@keyframes float-particle-light {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
        background: rgba(74, 144, 226, 0.3);
    }
    25% {
        opacity: 0.6;
        background: rgba(245, 101, 101, 0.3);
    }
    50% {
        opacity: 0.8;
        background: rgba(52, 211, 153, 0.3);
    }
    75% {
        opacity: 0.6;
        background: rgba(168, 85, 247, 0.3);
    }
    100% {
        transform: translateY(-10vh) translateX(30px);
        opacity: 0;
        background: rgba(74, 144, 226, 0.3);
    }
}

[data-theme="light"] button:hover {
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(74, 144, 226, 0.1);
}

[data-theme="light"] input:focus {
    box-shadow: 
        0 0 0 1px rgba(74, 144, 226, 0.3),
        0 0 25px rgba(74, 144, 226, 0.15),
        0 8px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(74, 144, 226, 0.4);
}

[data-theme="light"] .online-counter::before {
    background: #00d084;
    box-shadow: 0 0 12px #00d084;
}

#login, #signup, #chat, #menu, #createParty, #joinParty, #savedParties {
    display: none;
    max-width: 500px;
    width: 90%;
    padding: 48px;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 var(--border-primary);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#chat {
    max-width: 1100px;
    padding: 56px;
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border: 1px solid var(--border-secondary);
    border-radius: 28px;
    position: relative;
    display: none;
    box-shadow: 
        0 24px 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 var(--border-primary);
}

#chat.active {
    display: block;
}

h2 {
    text-align: center;
    margin-bottom: 36px;
    font-size: 28px;
    font-weight: 200;
    color: var(--text-primary);
    letter-spacing: 2px;
    text-transform: lowercase;
    font-family: 'JetBrains Mono', monospace;
}

h3 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: 1px;
    text-transform: lowercase;
}

input, button {
    width: 100%;
    padding: 18px 24px;
    margin: 12px 0;
    border: 1px solid var(--border-primary);
    background: var(--border-secondary);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s ease;
    font-weight: 300;
    font-family: 'JetBrains Mono', monospace;
}

input {
    color: var(--text-primary);
}

input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

button {
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 300;
    letter-spacing: 0.5px;
    text-transform: lowercase;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

button:hover::before {
    left: 100%;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 255, 255, 0.05);
}

.link {
    text-align: center;
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.link:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    font-size: 14px;
}

.toggle-password:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

#top-left-buttons, #top-right-buttons {
    position: absolute;
    top: 20px;
}

#top-left-buttons {
    left: 20px;
}

#top-right-buttons {
    right: 20px;
}

#top-left-buttons button, .dropbtn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 10px;
    width: auto;
    margin: 0 5px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#top-left-buttons button:hover, .dropbtn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    min-width: 200px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: hidden;
}

.dropdown-content button {
    color: rgba(255, 255, 255, 0.7);
    padding: 16px 20px;
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.dropdown-content button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#messages {
    height: 480px;
    overflow-y: auto;
    margin-bottom: 32px;
    padding: 32px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    font-size: 13px;
    line-height: 1.7;
    backdrop-filter: blur(15px);
}

#messages::-webkit-scrollbar {
    width: 4px;
}

#messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

#messages::-webkit-scrollbar-track {
    background: transparent;
}

.message {
    padding: 12px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: transparent;
    color: var(--text-primary);
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.message:last-child {
    border-bottom: none;
}

.message-input-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 32px;
    margin-top: 8px;
}

#messageInput {
    flex: 1;
    margin: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#sendBtn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    transition: all 0.2s ease;
}

#sendBtn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

#sendBtn i {
    font-size: 14px;
}

#partyCodeContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 32px auto;
    padding: 16px 32px;
    background: 
        linear-gradient(90deg, 
            rgba(255, 255, 255, 0.03) 0%, 
            rgba(255, 255, 255, 0.06) 50%, 
            rgba(255, 255, 255, 0.03) 100%
        );
    background-size: 200px 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    backdrop-filter: blur(15px);
    animation: shimmer 4s ease-in-out infinite;
}

#leavePartyBtn, #deletePartyBtn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    margin-top: 24px;
    font-size: 13px;
}

#leavePartyBtn:hover, #deletePartyBtn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.container {
    display: none;
    animation: slideInScale 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes slideInScale {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.container.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes breathe {
    0%, 100% {
        box-shadow: 
            0 12px 48px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 var(--border-primary),
            0 0 0 rgba(255, 255, 255, 0);
    }
    50% {
        box-shadow: 
            0 16px 64px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 var(--border-primary),
            0 0 30px rgba(255, 255, 255, 0.03);
    }
}

.container {
    animation: slideInScale 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), breathe 8s ease-in-out infinite;
}

#toast-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 1000;
}

.toast {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    color: #ffffff;
    padding: 16px 24px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.5px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 600px) {
    #login, #signup, #chat, #menu, #createParty, #joinParty {
        max-width: 100%;
        padding: 32px;
        margin: 20px;
        border-radius: 16px;
    }
    
    #chat {
        padding: 32px 24px;
    }
    
    input, button {
        font-size: 14px;
        padding: 16px 20px;
    }
    
    h2 {
        font-size: 28px;
        margin-bottom: 32px;
    }
}

/* Enhanced button styles for different actions */
#signupBtn, #loginBtn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 20px;
}

#signupBtn:hover, #loginBtn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
}

/* Menu buttons */
#menu button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

#menu button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Subtle glow effect on focus */
input:focus, button:focus {
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 20px rgba(255, 255, 255, 0.05);
}

/* Enhanced animations and micro-interactions */
.container:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Floating animation for containers */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Shimmer effect for party codes */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

.container {
    animation: fadeIn 0.4s ease, float 6s ease-in-out infinite;
}

/* Enhanced title styling */
h2 span {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
    position: relative;
}

h2 span::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-primary), transparent);
}

[data-theme="light"] h2 span {
    background: linear-gradient(135deg, #212529 0%, rgba(74, 144, 226, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px rgba(74, 144, 226, 0.2);
}

[data-theme="light"] h2 span::after {
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.3), transparent);
}

/* Pulse effect for party code */
#partyCodeContainer span {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Enhanced message styling */
.message {
    transition: all 0.2s ease;
    position: relative;
}

.message::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.message:hover::before {
    opacity: 1;
}

.message:hover {
    background: rgba(255, 255, 255, 0.02);
    transform: translateX(6px);
    padding-left: 8px;
}

.message:hover {
    background: rgba(255, 255, 255, 0.02);
    transform: translateX(4px);
}

/* Smooth entrance for new messages */
@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced input focus states */
input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.15),
        0 0 30px rgba(255, 255, 255, 0.08),
        0 8px 35px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px) scale(1.01);
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 var(--border-primary);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-buttons button {
    flex: 1;
    margin: 0;
}

/* Saved parties list */
#savedPartiesList {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.saved-party-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    margin: 12px 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.saved-party-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.saved-party-info {
    flex: 1;
}

.saved-party-name {
    font-weight: 400;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 4px;
}

.saved-party-code {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.saved-party-actions {
    display: flex;
    gap: 8px;
}

.saved-party-actions button {
    width: auto;
    padding: 8px 12px;
    margin: 0;
    font-size: 12px;
    border-radius: 8px;
}

/* Theme toggle */
#themeToggle {
    background: var(--border-secondary);
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 10px;
    width: auto;
    margin: 0 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#themeToggle:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
    border-color: var(--border-primary);
    transform: translateY(-1px);
}

/* Enhanced styling updates */
.link {
    color: var(--text-secondary);
}

.link:hover {
    color: var(--text-primary);
}

.toggle-password {
    color: var(--text-muted);
}

.toggle-password:hover {
    color: var(--text-primary);
}

#messages {
    background: var(--bg-primary);
    border: 1px solid var(--border-secondary);
}

.message {
    border-bottom: 1px solid var(--border-secondary);
    color: var(--text-primary);
}

#partyCodeContainer {
    background: var(--border-secondary);
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
}

.toast {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

/* Particle background effect */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 1px;
    height: 1px;
    background: var(--text-muted);
    border-radius: 50%;
    opacity: 0.4;
    animation: float-particle 12s infinite linear;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-10vh) translateX(50px);
        opacity: 0;
    }
}

/* Enhanced button effects */
button:active {
    transform: translateY(0) scale(0.98);
}

/* Minimalist design improvements */
.container {
    padding: 32px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-secondary);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.menu-container, .saved-parties-container {
    padding: 32px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-secondary);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* Simplified button styles */
button {
    padding: 14px 20px;
    border: 1px solid var(--border-primary);
    background: transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.3px;
}

button:hover {
    background: var(--hover-bg);
    border-color: var(--border-primary);
    transform: none;
    box-shadow: none;
}

/* Remove excessive animations */
button::before {
    display: none;
}

.container {
    animation: fadeIn 0.2s ease;
}

.container:hover {
    transform: none;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.menu-container:hover, .saved-parties-container:hover {
    transform: none;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* Simplified particles */
.particle {
    width: 1px;
    height: 1px;
    opacity: 0.3;
}

/* Remove floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(0px); }
}

/* Improved scrollbar for saved parties */
#savedPartiesList::-webkit-scrollbar {
    width: 4px;
}

#savedPartiesList::-webkit-scrollbar-thumb {
    background: var(--border-primary);
    border-radius: 2px;
}

#savedPartiesList::-webkit-scrollbar-track {
    background: transparent;
}

/* Status indicator */
.status-indicator {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    background: var(--border-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 1px;
    font-weight: 300;
}

/* Enhanced message animations */
.message {
    animation: slideInMessage 0.3s ease;
}


/* Enhanced container hover effects */
.container:hover {
    border-color: var(--border-primary);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 var(--border-primary);
}

/* Improved button spacing in containers */
.container button:last-child {
    margin-bottom: 0;
}

/* Enhanced focus states for better accessibility */
button:focus-visible, input:focus-visible {
    outline: 2px solid var(--border-primary);
    outline-offset: 2px;
}

/* New menu layout with separate containers */
.menu-layout {
    display: none;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    width: 95%;
    max-width: 1200px;
    animation: fadeIn 0.4s ease;
}

.menu-container {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 520px;
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 var(--border-primary);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.saved-parties-container {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 520px;
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 var(--border-primary);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.menu-header h2 {
    margin: 0;
    text-align: left;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Online counter */
.online-counter {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 11px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.online-counter::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 8px;
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    transform: translateY(-50%);
    animation: pulse-dot 2s ease-in-out infinite;
    box-shadow: 0 0 8px #00ff88;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
    50% { opacity: 0.6; transform: translateY(-50%) scale(1.2); }
}

.online-counter:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.online-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 16px 20px;
    white-space: nowrap;
    font-size: 11px;
    color: var(--text-primary);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    min-width: 120px;
    text-align: center;
}

.online-tooltip div {
    padding: 4px 0;
    color: var(--text-primary);
    font-size: 12px;
    letter-spacing: 0.5px;
}

.main-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.main-actions button {
    margin: 0;
    background: var(--border-secondary);
    border: 1px solid var(--border-primary);
}

.saved-parties-container h3 {
    margin-bottom: 32px;
    font-size: 20px;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Notification button */
.notification-btn {
    background: transparent;
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 20px;
    width: auto;
    margin: 0;
    transition: all 0.2s ease;
}

.notification-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.notification-btn.active {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
    animation: pulse-button 2s ease-in-out infinite;
}

@keyframes pulse-button {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
}

.notification-btn.active:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

/* Theme toggle button */
.theme-btn {
    background: transparent;
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 20px;
    width: auto;
    margin: 0;
    transition: all 0.2s ease;
}

.theme-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Sidebar party items for islands */
.sidebar-party-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.sidebar-party-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.sidebar-party-info {
    flex: 1;
}

.sidebar-party-name {
    font-weight: 400;
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 2px;
}

.sidebar-party-code {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.sidebar-party-remove {
    color: var(--text-muted);
    background: none;
    border: none;
    padding: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s ease;
    width: auto;
    margin: 0;
}

.sidebar-party-remove:hover {
    color: var(--text-secondary);
}

/* Empty state */
.sidebar-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 20px;
    font-style: italic;
}

/* Enhanced container hover effects */
.menu-container:hover, .saved-parties-container:hover {
    border-color: var(--border-primary);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 var(--border-primary);
    transform: translateY(-2px);
}

/* Improved spacing for all elements */
input, button {
    margin: 10px 0;
}

.main-actions button {
    padding: 20px 24px;
    font-size: 15px;
    margin: 0;
    border-radius: 16px;
    letter-spacing: 1px;
}

.main-actions button:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 0 25px rgba(255, 255, 255, 0.04);
}

/* Better spacing for saved parties */
#menuSavedPartiesList {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.sidebar-party-item {
    margin: 16px 0;
    padding: 20px 24px;
}

.sidebar-party-item:first-child {
    margin-top: 0;
}

.sidebar-party-item:last-child {
    margin-bottom: 0;
}

/* Responsive design */
@media (max-width: 600px) {
    .menu-layout {
        width: 100%;
        padding: 0 20px;
        gap: 20px;
    }
    
    .menu-container, .saved-parties-container {
        max-width: 100%;
        padding: 32px 24px;
    }
    
    .menu-header {
        flex-direction: column;
        gap: 16px;
        align-items: center;
        margin-bottom: 24px;
    }
    
    .menu-header h2 {
        text-align: center;
    }
    
    .main-actions button {
        padding: 18px 20px;
        font-size: 14px;
    }
}

/* Fix settings dropdown positioning on mobile */
@media (max-width: 600px) {
    .settings-content {
        right: -50px;
        min-width: 200px;
    }
}

/* Credit footer */
.credit {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: lowercase;
    opacity: 0.5;
    pointer-events: none;
    font-family: 'JetBrains Mono', monospace;
}