.menu-button {
    display: block;
    width: 200px;
    margin: 10px auto;
    padding: 15px 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px) brightness(1.1);
    color: white;
    text-decoration: none;
    font-size: 1.2em;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.menu-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.15),
    inset 0 0 20px rgba(255, 255, 255, 0.15),
    0 0 20px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.menu-button {
    will-change: transform;
    transform-origin: center;
    animation-name: drift;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.menu-button:nth-of-type(1) {
    animation-duration: 5s;
    animation-delay: 0s;
}

.menu-button:nth-of-type(2) {
    animation-duration: 5.6s;
    animation-delay: 0.7s;
}

.menu-button:nth-of-type(3) {
    animation-duration: 6.2s;
    animation-delay: 1.2s;
}

.menu-button:hover {
    animation-play-state: paused;
    transform: translateY(-2px) scale(1.02);
}

.bottom-left-button {
    position: fixed;
    bottom: 70px;
    left: 1px;
    z-index: 999;
    background: rgba(65, 109, 195, 0.8);
    color: #ffffff;
    padding: 12px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(65, 109, 195, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bottom-left-button:hover {
    background: rgba(65, 109, 195, 1);
    box-shadow: 0 0 30px rgba(65, 109, 195, 0.6);
    transform: translateY(-2px);
}

.login {
    position: absolute;
    top: 20px;
    right: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 10px 20px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px) brightness(1.1);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.login:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.15), inset 0 0 20px rgba(255, 255, 255, 0.15), 0 0 20px rgba(255, 255, 255, 0.1);
}

.login.hidden {
    display: none !important;
}

.login.logged-in {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    pointer-events: auto;
}

.login.logged-in img.avatar-inline {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
    vertical-align: middle;
}

.login.logged-in .user-nick-inline {
    font-weight: 700;
    color: white;
    font-size: 0.95em;
}

.logout-menu {
    position: absolute;
    top: 70px;
    right: 20px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 8px 0;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.logout-btn {
    width: 100%;
    padding: 10px 20px;
    background: none;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95em;
    text-align: left;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ff6b6b;
}

.menu-action-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.user-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.user-modal-content {
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.user-modal-content h3 {
    color: white;
    margin: 0 0 15px 0;
    font-size: 1.3em;
}

.user-modal-content input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1em;
    box-sizing: border-box;
}

.user-modal-content input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.user-modal-content input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.user-modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

#wip-notice {
    margin-top: 18px;
    padding: 10px 18px;
    background: rgba(255, 190, 50, 0.10);
    border: 1px solid rgba(255, 190, 50, 0.35);
    border-radius: 10px;
    color: rgb(255, 255, 255);
    font-size: 0.82rem;
    line-height: 1.5;
    text-align: center;
    letter-spacing: 0.03em;
    backdrop-filter: blur(6px);
    pointer-events: none;
    user-select: none;
}

#wip-notice strong {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 2px;
    letter-spacing: 0.06em;
}

.modal-btn {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.save-btn {
    background: rgba(65, 109, 195, 0.3);
    border-color: rgba(65, 109, 195, 0.5);
}

.save-btn:hover {
    background: rgba(65, 109, 195, 0.5);
    border-color: rgba(65, 109, 195, 0.8);
}

#nick-error {
    color: #ff6b6b;
    font-size: 0.9em;
    margin-top: 6px;
}

#avatar-error {
    color: #ff6b6b;
    font-size: 0.9em;
    margin-top: 6px;
}

/* Stylizacja file input dla avatara */
#avatar-input {
    padding: 0 !important;
    height: auto !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
}

#avatar-input::file-selector-button {
    padding: 10px 15px;
    margin: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(65, 109, 195, 0.3);
    color: white;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#avatar-input::file-selector-button:hover {
    background: rgba(65, 109, 195, 0.5);
    border-color: rgba(65, 109, 195, 0.8);
}

/* Fallback dla starszych przeglądarek */
#avatar-input::-webkit-file-upload-button {
    padding: 10px 15px;
    margin: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(65, 109, 195, 0.3);
    color: white;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#avatar-input::-webkit-file-upload-button:hover {
    background: rgba(65, 109, 195, 0.5);
    border-color: rgba(65, 109, 195, 0.8);
}

.settings-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.settings-modal.visible {
    display: flex;
}

.settings-modal-content {
    position: relative;
    background: rgba(30, 30, 40, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 32px 28px;
    border-radius: 12px;
    text-align: left;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    max-width: 420px;
    color: white;
    max-height: 80vh;
    overflow-y: auto;
}

.settings-close-x {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 1.1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.settings-close-x:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.settings-modal h2 {
    margin-bottom: 20px;
    font-size: 1.4em;
    text-align: center;
}

.setting-item {
    margin: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.setting-item label {
    font-weight: 500;
    font-size: 0.95em;
}

.setting-item input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
}

.setting-item input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
}

.setting-value {
    font-weight: bold;
    min-width: 40px;
    text-align: right;
}

.setting-item select,
.setting-item button {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    cursor: pointer;
    font-weight: 500;
}

.setting-item select:hover,
.setting-item button:hover {
    background: rgba(255, 255, 255, 0.1);
}


.settings-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
}

.settings-buttons button {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: transparent;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.settings-buttons button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.settings-buttons .settings-close {
    border-color: #6b9eff;
    color: #6b9eff;
}

.settings-buttons .settings-close:hover {
    background: rgba(107, 158, 255, 0.12);
}

.mobile-unsupported-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 11000;
    animation: fadeIn 0.3s ease;
}

.mobile-unsupported-modal.visible {
    display: flex;
}

.mobile-unsupported-content {
    text-align: center;
    color: white;
    padding: 40px 20px;
}

.mobile-unsupported-content h1 {
    font-size: 2.2em;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ff6b9d 0%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-unsupported-content p {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    max-width: 400px;
}

.mobile-unsupported-content .device-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.mobile-unsupported-button {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    margin-top: 10px;
}

.mobile-unsupported-button:hover {
    background: linear-gradient(135deg, #00ffff 0%, #00ccff 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
}

#restore-ui {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 960px;
    padding: 10px 20px;
    background: rgba(120, 145, 255, 0.884);
    border: 1px solid rgba(92, 107, 243, 0.3);
    border-radius: 6px;
    color: rgb(0, 0, 0);
    cursor: pointer;
    z-index: 1300;
    font-family: 'ARIAL BLACK', sans-serif;
    font-weight: bold;
    transition: all 1.5s ease;
}

#restore-ui:hover {
    background: rgba(255, 255, 255, 0.2);
}
