/* Loading Animation - Minecraft Theme */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.minecraft-loader {
    text-align: center;
    color: #fff;
    position: relative;
}

/* Mining Tools Animation */
.mining-tools {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.tool {
    width: 40px;
    height: 40px;
    position: relative;
    animation: miningMotion 2s ease-in-out infinite;
}

.tool:nth-child(1) {
    animation-delay: 0s;
}

.tool:nth-child(2) {
    animation-delay: 0.3s;
}

.tool:nth-child(3) {
    animation-delay: 0.6s;
}

.pickaxe {
    background: linear-gradient(45deg, #8B4513 0%, #A0522D 50%, #8B4513 100%);
    clip-path: polygon(20% 0%, 80% 0%, 90% 20%, 80% 40%, 60% 60%, 40% 60%, 20% 40%, 10% 20%);
    border: 2px solid #654321;
}

.shovel {
    background: linear-gradient(45deg, #A0522D 0%, #D2691E 50%, #A0522D 100%);
    clip-path: polygon(30% 0%, 70% 0%, 80% 30%, 70% 70%, 30% 70%, 20% 30%);
    border: 2px solid #8B4513;
}

.axe {
    background: linear-gradient(45deg, #696969 0%, #808080 50%, #696969 100%);
    clip-path: polygon(10% 20%, 50% 0%, 90% 20%, 80% 50%, 50% 70%, 20% 50%);
    border: 2px solid #2F4F4F;
}

@keyframes miningMotion {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-10px) rotate(-5deg);
    }

    50% {
        transform: translateY(-5px) rotate(5deg);
    }

    75% {
        transform: translateY(-15px) rotate(-3deg);
    }
}

/* Compass Animation */
.compass-container {
    margin-bottom: 20px;
    position: relative;
}

.compass {
    width: 60px;
    height: 60px;
    border: 4px solid #fff;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle, #1a1a1a 0%, #333 100%);
    box-shadow:
        inset 0 0 10px rgba(255, 255, 255, 0.3),
        0 0 20px rgba(0, 0, 0, 0.5);
    animation: compassFloat 3s ease-in-out infinite;
}

.compass::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #ff4444 0%, #ff4444 50%, #ffffff 50%, #ffffff 100%);
    transform: translate(-50%, -50%);
    animation: compassSpin 4s linear infinite;
    border-radius: 2px;
    box-shadow: 0 0 5px rgba(255, 68, 68, 0.7);
}

.compass::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 8px solid #ff4444;
    filter: drop-shadow(0 0 3px rgba(255, 68, 68, 0.8));
}

/* Cardinal directions on compass */
.compass-container::before {
    content: 'N';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
}

.compass-container::after {
    content: 'S';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
}

@keyframes compassFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes compassSpin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Minecraft Blocks with Web App Colors */
.block-row {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-bottom: 20px;
}

.minecraft-block {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    position: relative;
    animation: blockBounce 1.4s ease-in-out infinite;
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 0.3),
        inset -2px -2px 4px rgba(0, 0, 0, 0.3),
        2px 2px 6px rgba(0, 0, 0, 0.5);
}

.minecraft-block:nth-child(1) {
    animation-delay: 0s;
    background: linear-gradient(45deg, #667eea 0%, #5a67d8 25%, #667eea 50%, #5a67d8 75%, #667eea 100%);
}

.minecraft-block:nth-child(2) {
    animation-delay: 0.2s;
    background: linear-gradient(45deg, #764ba2 0%, #6b46c1 25%, #764ba2 50%, #6b46c1 75%, #764ba2 100%);
}

.minecraft-block:nth-child(3) {
    animation-delay: 0.4s;
    background: linear-gradient(45deg, #4c51bf 0%, #3730a3 25%, #4c51bf 50%, #3730a3 75%, #4c51bf 100%);
}

@keyframes blockBounce {

    0%,
    80%,
    100% {
        transform: translateY(0) scale(1);
    }

    40% {
        transform: translateY(-16px) scale(1.1);
    }
}

.block-row {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-bottom: 20px;
}

.minecraft-block {
    width: 32px;
    height: 32px;
    background: linear-gradient(45deg,
            #8b4513 0%, #654321 25%,
            #8b4513 50%, #654321 75%,
            #8b4513 100%);
    border: 2px solid #000;
    border-radius: 2px;
    position: relative;
    animation: blockBounce 1.4s ease-in-out infinite;
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 0.3),
        inset -2px -2px 4px rgba(0, 0, 0, 0.3),
        2px 2px 6px rgba(0, 0, 0, 0.5);
}

.minecraft-block:nth-child(1) {
    animation-delay: 0s;
    background: linear-gradient(45deg,
            #228b22 0%, #1e5e1e 25%,
            #228b22 50%, #1e5e1e 75%,
            #228b22 100%);
}

.minecraft-block:nth-child(2) {
    animation-delay: 0.2s;
    background: linear-gradient(45deg,
            #8b4513 0%, #654321 25%,
            #8b4513 50%, #654321 75%,
            #8b4513 100%);
}

.minecraft-block:nth-child(3) {
    animation-delay: 0.4s;
    background: linear-gradient(45deg,
            #696969 0%, #4d4d4d 25%,
            #696969 50%, #4d4d4d 75%,
            #696969 100%);
}

@keyframes blockBounce {

    0%,
    80%,
    100% {
        transform: translateY(0) scale(1);
    }

    40% {
        transform: translateY(-16px) scale(1.1);
    }
}

.loading-text {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(255, 255, 255, 0.3);
    animation: textPulse 2s ease-in-out infinite;
    margin-top: 10px;
    position: relative;
}

.loading-text::after {
    content: 'Discovering coordinates...';
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    animation: subtextFade 3s ease-in-out infinite;
}

@keyframes subtextFade {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
    }
}

@keyframes textPulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Floating particles for extra atmosphere */
.loading-screen::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    top: 20%;
    left: 10%;
    animation: floatParticle1 6s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.loading-screen::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    top: 60%;
    right: 15%;
    animation: floatParticle2 8s ease-in-out infinite;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
}

@keyframes floatParticle1 {

    0%,
    100% {
        transform: translateY(0) translateX(0);
        opacity: 0.6;
    }

    33% {
        transform: translateY(-20px) translateX(10px);
        opacity: 1;
    }

    66% {
        transform: translateY(-40px) translateX(-5px);
        opacity: 0.4;
    }
}

@keyframes floatParticle2 {

    0%,
    100% {
        transform: translateY(0) translateX(0);
        opacity: 0.4;
    }

    50% {
        transform: translateY(-30px) translateX(-15px);
        opacity: 0.8;
    }
}

/* SPA content fragment styles */
.page-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 18px;
    color: #222;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.card {
    padding: 12px;
    background: #f7f7f7;
    border-radius: 6px
}

.content-loader,
#contentLoader {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px;
    color: #444;
}

.loader-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid rgba(0, 0, 0, 0.08);
    border-top-color: #2b6cb0;
    animation: spin 1s linear infinite;
}

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

.dynamic-content-container {
    padding: 18px;
    max-width: 1100px;
    margin: 0 auto;
}


/* Minimalistic Decorative Elements for Main Page */
.header-decoration {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-tool {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mini-pickaxe {
    background: linear-gradient(45deg, #8B4513 0%, #A0522D 50%, #8B4513 100%);
    clip-path: polygon(20% 10%, 80% 10%, 85% 35%, 70% 60%, 30% 60%, 15% 35%);
    animation: gentlePulse 4s ease-in-out infinite;
}

.mini-shovel {
    background: linear-gradient(45deg, #A0522D 0%, #D2691E 50%, #A0522D 100%);
    clip-path: polygon(30% 5%, 70% 5%, 75% 40%, 65% 75%, 35% 75%, 25% 40%);
    animation: gentlePulse 4s ease-in-out infinite 1s;
}

.mini-axe {
    background: linear-gradient(45deg, #696969 0%, #808080 50%, #696969 100%);
    clip-path: polygon(15% 25%, 50% 5%, 85% 25%, 75% 55%, 50% 75%, 25% 55%);
    animation: gentlePulse 4s ease-in-out infinite 2s;
}

.mini-compass {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    background: radial-gradient(circle, #1a1a1a 0%, #333 100%);
    position: relative;
    animation: compassHover 6s ease-in-out infinite;
}

.mini-compass::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 1px;
    background: linear-gradient(90deg, #ff4444 0%, #ff4444 50%, #ffffff 50%, #ffffff 100%);
    transform: translate(-50%, -50%);
    animation: gentleSpin 8s linear infinite;
}

@keyframes gentlePulse {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes compassHover {

    0%,
    100% {
        transform: translateY(0);
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    }

    50% {
        transform: translateY(-2px);
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.5);
    }
}

@keyframes gentleSpin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.header-blocks {
    display: flex;
    gap: 3px;
    align-items: center;
}

.mini-block {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: gentleFloat 3s ease-in-out infinite;
}

.block-1 {
    background: linear-gradient(45deg, #667eea 0%, #5a67d8 50%, #667eea 100%);
    animation-delay: 0s;
}

.block-2 {
    background: linear-gradient(45deg, #764ba2 0%, #6b46c1 50%, #764ba2 100%);
    animation-delay: 0.5s;
}

.block-3 {
    background: linear-gradient(45deg, #4c51bf 0%, #3730a3 50%, #4c51bf 100%);
    animation-delay: 1s;
}

@keyframes gentleFloat {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.8;
    }

    50% {
        transform: translateY(-3px);
        opacity: 1;
    }
}

.header-axe {
    display: flex;
    align-items: center;
}

.locations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1em;
    padding-bottom: 0.8em;
    border-bottom: 2px solid rgba(160, 174, 192, 0.3);
    position: relative;
}

/* Hover effects for decorative elements */
.mini-tool:hover,
.mini-compass:hover {
    transform: scale(1.2);
    filter: brightness(1.2);
}

.mini-block:hover {
    transform: scale(1.3) translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Add subtle animations to existing elements */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #2d3748;
    margin: 0;
    min-height: 100vh;
}

header {
    background: rgba(30, 60, 114, 0.95);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 0.8em 2em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-height: 60px;
    flex-wrap: nowrap;
    animation: slideInFromTop 0.6s ease-out;
}

@keyframes slideInFromTop {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

header h1 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
    animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    100% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 8px rgba(255, 255, 255, 0.1);
    }
}

nav {
    display: flex;
    gap: 0.8em;
    flex-shrink: 0;
}

.nav-btn {
    color: #fff;
    text-decoration: none;
    padding: 0.6em 1.2em;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5em;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9em;
    font-weight: 500;
    min-width: 80px;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.admin-btn:hover {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.8), rgba(56, 161, 105, 0.8));
}

.download-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.8), rgba(79, 70, 229, 0.8));
}

.main-btn:hover {
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.8), rgba(229, 62, 62, 0.8));
}

.nav-icon {
    font-size: 1.1em;
}

.nav-text {
    font-weight: 600;
}

/* Responsive header */
@media (max-width: 600px) {
    header {
        padding: 0.6em 1em;
    }

    header h1 {
        font-size: 1.2em;
    }

    .nav-btn {
        padding: 0.5em 0.8em;
        font-size: 0.8em;
        min-width: 60px;
    }

    .nav-text {
        display: none;
    }
}

main {
    max-width: 900px;
    margin: 2em auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 2em;
}

h2 {
    margin-top: 0;
    color: #1a202c;
    font-weight: 600;
}

/* Locations section layout */
.locations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1em;
    padding-bottom: 0.8em;
    border-bottom: 2px solid rgba(160, 174, 192, 0.3);
    position: relative;
}

.locations-header h2 {
    margin: 0;
    text-align: center;
    flex: 1;
    outline: none;
    border-radius: 4px;
    padding: 0.3em 0.6em;
    transition: all 0.3s ease;
    cursor: text;
    min-height: 1.2em;
}

.locations-header h2:hover {
    background: rgba(99, 102, 241, 0.05);
}

.locations-header h2:focus {
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Placeholder styling for editable header */
.locations-header h2:empty:before {
    content: attr(data-placeholder);
    color: #a0a0a0;
    font-style: italic;
}

/* Direction buttons styling */
.btn-direction {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    padding: 0.4em 0.6em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #4f46e5;
    font-size: 1.1em;
    min-width: 35px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-direction::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.btn-direction:hover::before {
    width: 100%;
    height: 100%;
}

.btn-direction:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-direction.active {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.6);
    color: #3730a3;
    animation: activePulse 2s ease-in-out infinite;
}

@keyframes activePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(99, 102, 241, 0);
    }
}

/* Direction buttons active state */
.btn-direction.active {
    background: rgba(99, 102, 241, 0.9);
    color: white;
    border-color: rgba(99, 102, 241, 1);
}

/* Position undo button to the right */
.btn-undo {
    position: absolute;
    right: 0;
    top: -3em;
    font-size: 0.85em;
}

/* Responsive locations header */
@media (max-width: 768px) {
    .locations-header {
        gap: 0.5em;
    }

    .locations-header h2 {
        font-size: 1.2em;
    }

    .btn-direction {
        padding: 0.3em 0.5em;
        min-width: 30px;
        height: 28px;
        font-size: 0.9em;
    }

    .btn-undo {
        position: absolute;
        top: -2.5em;
        right: 0;
        font-size: 0.8em;
        padding: 0.4em 0.6em;
    }

    main {
        max-width: 95%;
        margin: 1em auto;
        padding: 1.5em;
    }
}

.locations-container {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5em;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.3);
    border: 1px solid rgba(160, 174, 192, 0.2);
}

.locations-container::-webkit-scrollbar {
    width: 8px;
}

.locations-container::-webkit-scrollbar-track {
    background: rgba(160, 174, 192, 0.1);
    border-radius: 4px;
}

.locations-container::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}

.locations-container::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* Location list styling */
#locations-list {
    list-style: none;
    padding: 1em;
    margin: 0;
    direction: ltr;
    /* Default direction */
}

#locations-list.rtl {
    direction: rtl;
}

#locations-list.ltr {
    direction: ltr;
}

/* Ensure coordinates always display left-to-right */
.location-coords {
    direction: ltr !important;
    unicode-bidi: embed;
}

.location-item {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(160, 174, 192, 0.3);
    border-radius: 8px;
    margin: 0 0 0.8em 0;
    padding: 1em;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1em;
    align-items: center;
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    animation: slideInFromRight 0.5s ease-out backwards;
}

.location-item:nth-child(1) {
    animation-delay: 0.1s;
}

.location-item:nth-child(2) {
    animation-delay: 0.2s;
}

.location-item:nth-child(3) {
    animation-delay: 0.3s;
}

.location-item:nth-child(4) {
    animation-delay: 0.4s;
}

.location-item:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(30px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.location-item:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px) scale(1.02);
}

.location-item.dragging {
    opacity: 0.7;
    transform: rotate(2deg) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    animation: dragPulse 0.6s ease-in-out infinite alternate;
}

@keyframes dragPulse {
    0% {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    }

    100% {
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    }
}

.location-item.drag-over {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.location-info {
    display: flex;
    align-items: center;
    gap: 1em;
    min-width: 0;
    /* Allow text truncation */
}

.location-name {
    font-size: 1.1em;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    padding: 0.2em 0.5em;
    border-radius: 6px;
    cursor: text;
    transition: background 0.2s;
    border: 1px solid transparent;
    min-width: 120px;
    flex-shrink: 0;
}

.location-name:hover,
.location-name:focus {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    outline: none;
}

.location-coords {
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    font-weight: 600;
    color: #4a5568;
    background: rgba(237, 242, 247, 0.8);
    padding: 0.4em 0.8em;
    border-radius: 6px;
    white-space: nowrap;
}

.location-actions {
    display: flex;
    gap: 0.5em;
    align-items: center;
    margin-left: 1em;
}

/* Button styling with icons and colors */
.btn {
    padding: 0.5em 0.8em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3em;
    text-decoration: none;
    color: white;
    min-width: 75px;
    justify-content: center;
}

.btn-copy {
    background: linear-gradient(135deg, #48bb78, #38a169);
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.btn-copy:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.btn-copy::before {
    content: "📋";
    font-size: 1em;
}

.btn-delete {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    box-shadow: 0 2px 8px rgba(245, 101, 101, 0.3);
}

.btn-delete:hover {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.4);
}

.btn-delete::before {
    content: "🗑️";
    font-size: 1em;
}

.btn-undo {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    box-shadow: 0 2px 8px rgba(237, 137, 54, 0.3);
    font-size: 0.9em;
}

.btn-undo:hover {
    background: linear-gradient(135deg, #dd6b20, #c05621);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.4);
}

.btn-undo .btn-icon {
    font-size: 1.2em;
    font-weight: bold;
}

.btn-reset-order {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    font-size: 0.9em;
}

.btn-reset-order:hover {
    background: linear-gradient(135deg, #5a6fd8, #6b4298);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-reset-order .btn-icon {
    font-size: 1.2em;
    font-weight: bold;
}

button {
    margin-left: 0.5em;
}

/* Popup styles */
#popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(16, 185, 129, 0.95);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 1em 2em;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: none;
    font-weight: 600;
    z-index: 1000;
}

.copy-popup {
    position: fixed;
    background: rgba(16, 185, 129, 0.95);
    color: #fff;
    padding: 0.5em 1em;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: none;
    font-size: 0.85em;
    font-weight: 600;
    z-index: 1001;
    pointer-events: none;
}

.delete-confirmation {
    position: fixed;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(245, 101, 101, 0.5);
    border-radius: 12px;
    padding: 1.2em;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 220px;
    text-align: center;
    animation: fadeInScale 0.2s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.delete-confirmation p {
    margin: 0 0 1em 0;
    color: #1a202c;
    font-weight: 600;
    font-size: 1em;
}

.delete-confirmation .btn-confirm {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    margin-right: 0.5em;
    font-size: 0.85em;
    padding: 0.5em 1em;
}

.delete-confirmation .btn-cancel {
    background: linear-gradient(135deg, #a0aec0, #718096);
    font-size: 0.85em;
    padding: 0.5em 1em;
}

/* Statistics section */
.statistics {
    margin-top: 3em;
    padding: 2em;
    background: rgba(247, 250, 252, 0.8);
    border-radius: 16px;
    border: 2px solid rgba(160, 174, 192, 0.2);
}

.statistics h3 {
    margin: 0 0 1.5em 0;
    color: #1a202c;
    font-weight: 700;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.statistics h3::before {
    content: "📊";
    font-size: 1.2em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1em;
    margin-bottom: 2em;
}

.stat-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 1em;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(160, 174, 192, 0.2);
}

.stat-value {
    font-size: 2em;
    font-weight: 800;
    color: #3182ce;
    margin-bottom: 0.2em;
}

.stat-label {
    color: #4a5568;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-map {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 1.5em;
    border: 2px solid rgba(160, 174, 192, 0.3);
    text-align: center;
}

.mini-map h4 {
    margin: 0 0 1em 0;
    color: #1a202c;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
}

.mini-map h4::before {
    content: "🗺️";
    font-size: 1.1em;
}

.map-placeholder {
    background: linear-gradient(135deg, #4fd1c7 0%, #3b82f6 100%);
    height: 150px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 1em;
}

.coordinate-range {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1em;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
}

.range-item {
    background: rgba(237, 242, 247, 0.8);
    padding: 0.5em;
    border-radius: 6px;
    text-align: center;
}

.range-label {
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 0.2em;
}

.range-value {
    color: #1a202c;
    font-weight: 700;
}

.hidden {
    display: none;
}

/* Admin Panel Styles */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5em;
    margin: 2em 0;
}

.admin-card {
    background: rgba(248, 250, 252, 0.9);
    border: 2px solid rgba(160, 174, 192, 0.3);
    border-radius: 12px;
    padding: 1.5em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.admin-card h3 {
    margin: 0 0 1em 0;
    color: #1a202c;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.status-indicator {
    padding: 0.5em 1em;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5em;
}

.status-connected {
    background: rgba(72, 187, 120, 0.2);
    color: #2f855a;
    border: 1px solid rgba(72, 187, 120, 0.5);
}

.status-connecting {
    background: rgba(237, 137, 54, 0.2);
    color: #c05621;
    border: 1px solid rgba(237, 137, 54, 0.5);
}

.status-disconnected {
    background: rgba(245, 101, 101, 0.2);
    color: #c53030;
    border: 1px solid rgba(245, 101, 101, 0.5);
}

#server-stats div {
    padding: 0.3em 0;
    color: #4a5568;
}

#server-stats span {
    font-weight: 700;
    color: #1a202c;
}

.admin-actions {
    display: flex;
    gap: 0.8em;
    flex-wrap: wrap;
}

.btn-refresh {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.btn-clear {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 0.8em;
}

.download-link {
    display: flex;
    align-items: center;
    gap: 0.8em;
    padding: 1em;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(160, 174, 192, 0.3);
    border-radius: 8px;
    text-decoration: none;
    color: #1a202c;
    transition: all 0.3s ease;
}

.download-link:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.download-icon {
    font-size: 1.5em;
}

.download-text {
    font-weight: 600;
}

/* Error message styles */
.error-message {
    background: #fed7d7;
    border: 1px solid #fc8181;
    color: #c53030;
    padding: 1em;
    border-radius: 8px;
    margin: 1em 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.error-message h3 {
    margin: 0 0 0.5em 0;
    color: #c53030;
}

.error-message p {
    margin: 0.5em 0;
}

.error-message code {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.error-message button {
    background: #c53030;
    color: white;
    border: none;
    padding: 0.5em 1em;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 0.5em;
}

.error-message button:hover {
    background: #a72828;
}

/* Dashboard Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    color: #fff;
}

.dashboard-card h3 {
    margin: 0 0 15px 0;
    color: #64ffda;
    font-size: 1.2em;
}

.dashboard-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* User info in header */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info-text {
    color: #64ffda;
    font-weight: 500;
}

.user-class-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-admin {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
}

.badge-member {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
}

.badge-guest {
    background: linear-gradient(135deg, #95e1d3, #a8e6cf);
    color: #2d3748;
}

.badge-unknown {
    background: #718096;
    color: white;
}

/* Navigation actions */
.nav-actions {
    display: flex;
    gap: 10px;
}

/* World list */
.world-list {
    max-height: 200px;
    overflow-y: auto;
}

.world-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.world-item:last-child {
    border-bottom: none;
}

.no-worlds {
    color: #a0aec0;
    font-style: italic;
    padding: 20px 0;
    text-align: center;
}

/* Location section */
.location-section {
    margin: 40px 0;
}

.location-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.location-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.location-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.location-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

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

.location-name {
    font-weight: 600;
    color: #64ffda;
}

.location-date {
    color: #a0aec0;
    font-size: 0.9em;
}

.location-coords {
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* Toast messages */
.success-toast,
.error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

.success-toast {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.error-toast {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Profile modal specific styles */
.profile-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.profile-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-field:last-child {
    border-bottom: none;
}

.profile-field label {
    font-weight: 600;
    color: #64ffda;
}

.profile-field span {
    color: #e2e8f0;
}

/* Responsive design for dashboard */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .user-info {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .nav-actions {
        flex-direction: column;
        width: 100%;
    }

    .location-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Minecraft-Themed Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

.login-card {
    background: rgba(45, 55, 72, 0.95);
    backdrop-filter: blur(15px);
    border: 3px solid #4a5568;
    border-radius: 15px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.minecraft-style::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(45deg, transparent 25%, rgba(100, 255, 218, 0.03) 25%, rgba(100, 255, 218, 0.03) 50%, transparent 50%),
        linear-gradient(-45deg, transparent 25%, rgba(100, 255, 218, 0.03) 25%, rgba(100, 255, 218, 0.03) 50%, transparent 50%);
    background-size: 20px 20px;
    pointer-events: none;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #64ffda;
    font-size: 2.5em;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

.login-header p {
    color: #e2e8f0;
    margin: 10px 0;
    font-size: 1.1em;
}

.login-subtitle {
    margin-top: 15px;
}

.login-hint {
    color: #a0aec0;
    font-size: 0.9em;
    background: rgba(100, 255, 218, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(100, 255, 218, 0.2);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.minecraft-input {
    position: relative;
}

.minecraft-input label {
    display: block;
    color: #64ffda;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.minecraft-field {
    width: 100%;
    padding: 15px 20px;
    background: rgba(26, 32, 44, 0.8);
    border: 2px solid #4a5568;
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.minecraft-field:focus {
    outline: none;
    border-color: #64ffda;
    background: rgba(26, 32, 44, 0.9);
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
}

.minecraft-field::placeholder {
    color: #a0aec0;
}

.minecraft-button {
    padding: 18px 30px;
    font-size: 1.2em;
    font-weight: 700;
    background: linear-gradient(135deg, #64ffda 0%, #4ecdc4 100%);
    color: #2d3748;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 25px rgba(100, 255, 218, 0.3);
}

.minecraft-button:hover {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(100, 255, 218, 0.4);
}

.minecraft-button:active {
    transform: translateY(0);
}

.minecraft-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Login Messages */
.login-messages {
    margin: 20px 0;
}

.message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 10px 0;
    font-weight: 500;
    animation: slideInUp 0.3s ease;
}

.message.hidden {
    display: none;
}

.error-message {
    background: rgba(245, 101, 101, 0.1);
    border: 2px solid rgba(245, 101, 101, 0.3);
    color: #f56565;
}

.success-message {
    background: rgba(72, 187, 120, 0.1);
    border: 2px solid rgba(72, 187, 120, 0.3);
    color: #48bb78;
}

.loading-message {
    background: rgba(100, 255, 218, 0.1);
    border: 2px solid rgba(100, 255, 218, 0.3);
    color: #64ffda;
}

.minecraft-loader-small {
    display: inline-block;
}

.mining-animation {
    animation: miningBounce 1s ease-in-out infinite;
    font-size: 1.2em;
}

@keyframes miningBounce {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-5px) rotate(-10deg);
    }

    50% {
        transform: translateY(0) rotate(5deg);
    }

    75% {
        transform: translateY(-3px) rotate(-5deg);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Login Footer */
.login-footer {
    margin-top: 30px;
    text-align: center;
}

.login-tips {
    background: rgba(100, 255, 218, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 10px;
    padding: 15px;
}

.login-tips p {
    margin: 0;
    color: #a0aec0;
    font-size: 0.9em;
}

.login-tips strong {
    color: #64ffda;
}

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

.modal-content {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border: 2px solid #4a5568;
    border-radius: 15px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 25px;
    border-radius: 13px 13px 0 0;
    border-bottom: 2px solid #4a5568;
}

.modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.5em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-body {
    padding: 25px;
    color: #e2e8f0;
}

.modal-body p {
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.modal-body ul {
    margin: 15px 0;
    padding-left: 20px;
}

.modal-body li {
    margin: 8px 0;
    line-height: 1.5;
}

.modal-actions {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #a0aec0;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(45, 55, 72, 0.8);
    border: 2px solid #4a5568;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(45, 55, 72, 0.95);
}

.form-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.form-warning p {
    margin: 0;
    color: #ffc107;
    font-size: 0.95em;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(74, 85, 104, 0.8);
    color: #e2e8f0;
    border: 1px solid #4a5568;
}

.btn-secondary:hover {
    background: rgba(74, 85, 104, 1);
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Responsive Login */
@media (max-width: 768px) {
    .login-container {
        padding: 10px;
    }

    .login-card {
        padding: 30px 20px;
        margin: 10px;
    }

    .login-header h1 {
        font-size: 2em;
    }

    .minecraft-field {
        padding: 12px 15px;
        font-size: 16px;
        /* Prevent iOS zoom */
    }

    .minecraft-button {
        padding: 15px 25px;
        font-size: 1.1em;
    }
}

/* Navigation Menu Styles */
.main-navigation {
    background: rgba(45, 55, 72, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.nav-container {
    display: flex;
    align-items: center;
    padding: 0;
}

.nav-brand {
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.2em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
}

.nav-link:hover,
.nav-action-button:hover {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
    transform: translateY(-1px);
}

.nav-link.active,
.nav-action-button.active {
    background: rgba(100, 255, 218, 0.15);
    color: #64ffda;
    box-shadow: inset 0 -3px 0 #64ffda;
}

.nav-action-button {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
}

.nav-icon {
    font-size: 1.1em;
}

.nav-text {
    font-size: 0.95em;
}

/* Dropdown Menu Styles */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.nav-dropdown-toggle:hover {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
}

.nav-dropdown-toggle.active {
    background: rgba(100, 255, 218, 0.15);
    color: #64ffda;
}

.dropdown-arrow {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-dropdown-item:last-child {
    border-bottom: none;
}

.nav-dropdown-item:hover {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
}

/* User Badge Styles */
.nav-user-info {
    margin-left: auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.user-greeting {
    color: #e2e8f0;
    font-size: 0.9em;
}

.user-name {
    color: #64ffda;
    font-weight: 600;
}

.user-class-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-admin {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    border-color: rgba(255, 107, 107, 0.3);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.badge-member {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    border-color: rgba(78, 205, 196, 0.3);
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

.badge-guest {
    background: linear-gradient(135deg, #95e1d3, #a8e6cf);
    color: #2d3748;
    border-color: rgba(149, 225, 211, 0.3);
    box-shadow: 0 2px 8px rgba(149, 225, 211, 0.3);
}

.badge-unknown {
    background: rgba(113, 128, 150, 0.8);
    color: white;
    border-color: rgba(113, 128, 150, 0.3);
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    gap: 10px;
    padding-right: 20px;
}

.nav-action-btn {
    padding: 8px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-action-btn:hover {
    background: rgba(100, 255, 218, 0.2);
    border-color: rgba(100, 255, 218, 0.4);
    color: #64ffda;
    transform: translateY(-1px);
}

.nav-action-btn.logout-btn {
    background: rgba(245, 101, 101, 0.1);
    border-color: rgba(245, 101, 101, 0.3);
    color: #f56565;
}

.nav-action-btn.logout-btn:hover {
    background: rgba(245, 101, 101, 0.2);
    border-color: rgba(245, 101, 101, 0.5);
    color: #ff6b6b;
}

/* Mobile Navigation */
.nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: 1.5em;
    padding: 10px;
    cursor: pointer;
    margin-left: auto;
    margin-right: 20px;
}

/* Responsive Navigation */
@media (max-width: 1024px) {
    .nav-text {
        display: none;
    }

    .nav-link,
    .nav-dropdown-toggle {
        padding: 15px 12px;
        justify-content: center;
    }

    .nav-user-info {
        padding: 10px 15px;
    }

    .user-greeting {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-navigation {
        margin-bottom: 15px;
    }

    .nav-container {
        flex-wrap: wrap;
        position: relative;
    }

    .nav-brand {
        flex: 1;
        border-right: none;
    }

    .nav-mobile-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        background: rgba(26, 32, 44, 0.95);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu.mobile-open {
        display: flex;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-link,
    .nav-dropdown-toggle {
        padding: 15px 20px;
        border-right: none;
        justify-content: flex-start;
    }

    .nav-text {
        display: inline;
    }

    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(45, 55, 72, 0.8);
        border: none;
        border-radius: 0;
        box-shadow: none;
        margin-left: 20px;
        border-left: 2px solid rgba(100, 255, 218, 0.3);
    }

    .nav-dropdown.open .nav-dropdown-menu {
        display: block;
    }

    .nav-user-info {
        width: 100%;
        margin-left: 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        justify-content: space-between;
        padding: 15px 20px;
    }

    .nav-actions {
        width: 100%;
        padding: 15px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        justify-content: center;
    }
}

/* Navigation Animation */
.nav-container {
    animation: slideInFromTop 0.6s ease-out;
}

@keyframes slideInFromTop {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading State for Navigation */
.nav-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #a0aec0;
}

.nav-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(100, 255, 218, 0.3);
    border-top: 2px solid #64ffda;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Rate Limiter Control Styles */
.rate-limiter-controls {
    margin-top: 15px;
}

.control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.control-row:last-child {
    border-bottom: none;
    justify-content: center;
}

.control-section {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-section h4 {
    margin: 0 0 15px 0;
    color: #64ffda;
    font-size: 1em;
    font-weight: 600;
}

.input-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.input-group label {
    color: #e2e8f0;
    font-size: 0.9em;
    font-weight: 500;
    flex: 1;
}

.input-group input {
    width: 80px;
    padding: 6px 10px;
    background: rgba(26, 32, 44, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #e2e8f0;
    font-size: 0.9em;
    text-align: center;
}

.input-group input:focus {
    outline: none;
    border-color: #64ffda;
    box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.2);
}

.btn-toggle {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    font-size: 0.85em;
    min-width: 70px;
}

.btn-toggle.enabled {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.btn-toggle.disabled {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

.btn-update {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    padding: 8px 15px;
    font-size: 0.85em;
    margin-top: 10px;
    width: 100%;
}

.btn-reset {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
    padding: 8px 20px;
    font-size: 0.9em;
}

.btn-toggle:hover,
.btn-update:hover,
.btn-reset:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Status indicators for rate limiter */
.status-enabled {
    background: rgba(72, 187, 120, 0.2);
    color: #48bb78;
    border: 1px solid rgba(72, 187, 120, 0.5);
}

.status-disabled {
    background: rgba(245, 101, 101, 0.2);
    color: #f56565;
    border: 1px solid rgba(245, 101, 101, 0.5);
}

.status-dev-mode {
    background: rgba(237, 137, 54, 0.2);
    color: #ed8936;
    border: 1px solid rgba(237, 137, 54, 0.5);
}

/* Responsive adjustments for rate limiter controls */
@media (max-width: 768px) {
    .control-row {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .input-group {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .input-group input {
        width: 120px;
    }
}