:root {
            --bg-dark: #0b0f13;
            --panel-bg: rgba(22, 28, 36, 0.7);
            --border-color: rgba(255, 255, 255, 0.08);
            --primary: #5865F2;
            --primary-hover: #4752c4;
            --success: #2ecc71;
            --success-glow: rgba(46, 204, 113, 0.2);
            --warning: #f1c40f;
            --danger: #e74c3c;
            --text-main: #f5f6fa;
            --text-muted: #8f9ca7;
            --glass-blur: 16px;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Inter', sans-serif;
        }

        body {
            background-color: var(--bg-dark);
            background-image: 
                radial-gradient(at 0% 0%, rgba(88, 101, 242, 0.15) 0px, transparent 50%),
                radial-gradient(at 100% 100%, rgba(46, 204, 113, 0.1) 0px, transparent 50%);
            background-attachment: fixed;
            color: var(--text-main);
            min-height: 100vh;
            padding: 24px;
            display: flex;
            justify-content: center;
        }

        .card {
    overflow: hidden;
    word-wrap: break-word;
}

.btn-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.action-btn {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-btn {
    flex: 1 1 auto;
    min-width: 0;
}

.container {
    overflow-x: hidden;
}
        

        .container {
            width: 100%;
            max-width: 900px;
            background: var(--panel-bg);
            backdrop-filter: blur(var(--glass-blur));
            -webkit-backdrop-filter: blur(var(--glass-blur));
            border: 1px solid var(--border-color);
            border-radius: 16px;
            padding: 32px;
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
            transition: max-width 0.4s ease;
@media (max-width: 600px) {
    .container {
        max-width: 100%;
    }
    .tab-bar {
        flex-wrap: wrap;
    }
}
        }

        header {
            text-align: center;
            margin-bottom: 24px;
        }

        header h1 {
            font-size: 1.8em;
            font-weight: 700;
            letter-spacing: -0.5px;
            margin-bottom: 6px;
            background: linear-gradient(135deg, #fff 0%, var(--text-muted) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        header p {
            color: var(--text-muted);
            font-size: 0.9em;
        }

        .tab-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


        .tab-btn {
            flex: 1;
            min-width: 0;
            background: transparent;
            border: none;
            color: var(--text-muted);
            padding: 10px 16px;
            font-size: 0.9em;
            font-weight: 500;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: center;
        }

        @media (max-width: 600px) {
            .tab-btn {
                flex: 1 1 100%;
                min-width: 0;
            }
        }

        .tab-btn:hover {
            color: var(--text-main);
            background: rgba(255, 255, 255, 0.03);
        }

        .tab-btn.active {
            color: #fff;
            background: var(--primary);
            box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
        }

        .tab-content {
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(5px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Home Tab */
        .status-card {
            background: rgba(0, 0, 0, 0.15);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
        }

        .status-info h3 {
            font-size: 1.1em;
            color: var(--text-muted);
            margin-bottom: 4px;
        }

        .status-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-weight: 600;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.85em;
        }

        .status-badge.online {
            background: var(--success-glow);
            color: var(--success);
            border: 1px solid rgba(46, 204, 113, 0.3);
        }

        .status-badge.offline {
            background: rgba(231, 76, 60, 0.1);
            color: var(--danger);
            border: 1px solid rgba(231, 76, 60, 0.3);
        }

        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: currentColor;
            box-shadow: 0 0 8px currentColor;
        }
.player-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
}

@media (max-width: 600px) {
    .player-row {
        grid-template-columns: 1fr;
    }
}

        .btn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

@media (min-width: 600px) {
    .btn-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

        button.action-btn {
            padding: 12px;
            font-size: 0.95em;
            font-weight: 600;
            border: none;
            border-radius: 10px;
            color: #fff;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        button.action-btn.start { background: var(--success); }
        button.action-btn.start:hover { background: #27ae60; }
        button.action-btn.stop { background: var(--danger); }
        button.action-btn.stop:hover { background: #c0392b; }
        button.action-btn.restart { background: var(--warning); color: #000; }
        button.action-btn.restart:hover { background: #d4ac0d; }

        /* General layout blocks */
        .card {
            background: rgba(0, 0, 0, 0.15);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 24px;
            margin-bottom: 20px;
        }

        .card h3 {
            margin-bottom: 16px;
            font-size: 1.1em;
            border-bottom: 1px solid var(--border-color);
            padding-bottom: 8px;
        }

        /* Console Output */
        pre.log-output {
            background: #050709;
            border: 1px solid var(--border-color);
            color: #7bed9f;
            padding: 16px;
            border-radius: 10px;
            height: 350px;
            overflow-y: auto;
            font-family: 'Consolas', 'Courier New', monospace;
            font-size: 0.88em;
            line-height: 1.4;
            white-space: pre-wrap;
            margin-bottom: 12px;
        }

        .cmd-box {
            display: flex;
            gap: 8px;
        }

        .cmd-box input {
            flex: 1;
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px 16px;
            color: #fff;
            outline: none;
        }

        .cmd-box input:focus {
            border-color: var(--primary);
        }

        .cmd-box button {
            background: var(--primary);
            color: white;
            border: none;
            padding: 10px 24px;
            font-weight: 600;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .cmd-box button:hover {
            background: var(--primary-hover);
        }

        /* Forms & Properties */
        .form-group {
            margin-bottom: 16px;
        }

        .form-group label {
            display: block;
            font-size: 0.88em;
            color: var(--text-muted);
            margin-bottom: 6px;
        }

        .form-group input, .form-group select {
            width: 100%;
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px 14px;
            color: #fff;
            outline: none;
        }

        .form-group input:focus, .form-group select:focus {
            border-color: var(--primary);
        }

        /* Lists */
        ul.item-list {
            list-style: none;
        }

        ul.item-list li {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            margin-bottom: 8px;
        }

        /* Player Details list styling */
        @media (max-width: 600px) {
    .player-row {
        grid-template-columns: 1fr;
    }
}

        /* Drag & Drop Upload Zone */
        .upload-zone {
            border: 2px dashed var(--border-color);
            border-radius: 12px;
            padding: 30px;
            text-align: center;
            cursor: pointer;
            transition: border-color 0.2s;
            margin-bottom: 20px;
        }

        .upload-zone:hover, .upload-zone.dragover {
            border-color: var(--primary);
            background: rgba(88, 101, 242, 0.05);
        }

        /* Modals */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.6);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(4px);
        }

        .modal-content {
            background: var(--panel-bg);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            padding: 32px;
            width: 90%;
            max-width: 500px;
            box-shadow: 0 4px 24px #000c;
        }

        .modal-buttons {
            display: flex;
            gap: 12px;
            margin-top: 20px;
            justify-content: flex-end;
        }

        .modal-buttons button {
            padding: 10px 20px;
            border-radius: 8px;
            border: none;
            cursor: pointer;
            font-weight: 600;
        }

        .btn-primary { background: var(--primary); color: white; }
        .btn-secondary { background: rgba(255, 255, 255, 0.1); color: white; }

        .msg-alert {
            padding: 12px;
            border-radius: 8px;
            margin-top: 12px;
            text-align: center;
            font-size: 0.9em;
            display: none;
        }
        .msg-alert.success { background: rgba(46, 204, 113, 0.15); color: var(--success); }
        .msg-alert.error { background: rgba(231, 76, 60, 0.15); color: var(--danger); }

        /* Modern Stepper UI */
        .stepper {
            display: flex;
            flex-direction: column;
            gap: 16px;
            margin-top: 24px;
        }

        .step-item {
            display: flex;
            gap: 16px;
            align-items: flex-start;
            padding: 16px;
            background: rgba(255, 255, 255, 0.01);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .step-item.pending {
            opacity: 0.5;
        }

        .step-item.active {
            background: rgba(88, 101, 242, 0.06);
            border-color: rgba(88, 101, 242, 0.3);
            box-shadow: 0 4px 20px rgba(88, 101, 242, 0.08);
            opacity: 1;
        }

        .step-item.completed {
            background: rgba(46, 204, 113, 0.04);
            border-color: rgba(46, 204, 113, 0.25);
            opacity: 1;
        }

        .step-icon {
            width: 28px;
            height: 28px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border-color);
            transition: all 0.3s ease;
        }

        .step-item.active .step-icon {
            border-color: var(--primary);
            background: rgba(88, 101, 242, 0.1);
        }

        .step-item.completed .step-icon {
            border-color: var(--success);
            background: rgba(46, 204, 113, 0.1);
        }

        .step-content {
            flex: 1;
        }

        .step-title {
            font-size: 0.95em;
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 2px;
        }

        .step-item.pending .step-title {
            color: var(--text-muted);
        }

        .step-desc {
            font-size: 0.85em;
            color: var(--text-muted);
        }

        .step-console {
            margin-top: 12px;
            background: #040608;
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            padding: 10px 14px;
            font-family: 'Consolas', monospace;
            font-size: 0.82em;
            color: #7bed9f;
            line-height: 1.4;
            max-height: 120px;
            overflow-y: auto;
            white-space: pre-wrap;
            animation: slideDown 0.3s ease-out forwards;
        }

        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-5px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* SVG Checkmark draw animation */
        .checkmark-svg {
            width: 18px;
            height: 18px;
        }

        .checkmark-circle {
            stroke-dasharray: 166;
            stroke-dashoffset: 166;
            stroke-width: 3;
            stroke: var(--success);
            fill: none;
        }

        .checkmark-check {
            stroke-dasharray: 48;
            stroke-dashoffset: 48;
            stroke-width: 3;
            stroke: var(--success);
            fill: none;
        }

        .completed .checkmark-circle {
            animation: stroke 0.4s cubic-bezier(0.65, 0, 0.45, 1) forwards;
        }

        .completed .checkmark-check {
            animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.3s forwards;
        }

        /* Spinning SVG Loader */
        .spinner-svg {
            animation: rotate 1.8s linear infinite;
            width: 18px;
            height: 18px;
        }

        .spinner-circle {
            stroke: var(--primary);
            stroke-linecap: round;
            animation: dash 1.5s ease-in-out infinite;
            fill: none;
            stroke-width: 3;
        }

        @keyframes rotate {
            100% { transform: rotate(360deg); }
        }

        @keyframes dash {
            0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
            50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
            100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
        }

        @keyframes stroke {
            100% { stroke-dashoffset: 0; }
        }

        /* Large Success Checkmark */
        .success-checkmark-card {
            text-align: center;
            padding: 30px 10px;
            animation: scaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }

        @keyframes scaleUp {
            from { transform: scale(0.9); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }

        .large-checkmark-svg {
            width: 64px;
            height: 64px;
            margin-bottom: 20px;
        }

        .large-checkmark-circle {
            stroke-dasharray: 166;
            stroke-dashoffset: 166;
            stroke-width: 4;
            stroke: var(--success);
            fill: none;
            animation: stroke 0.5s cubic-bezier(0.65, 0, 0.45, 1) forwards;
        }

        .large-checkmark-check {
            stroke-dasharray: 48;
            stroke-dashoffset: 48;
            stroke-width: 4;
            stroke: var(--success);
            fill: none;
            animation: stroke 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
        }

        /* Cheat inputs */
        .cheat-input {
            width: 100%;
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 7px 10px;
            color: #fff;
            font-size: 0.85em;
            outline: none;
            box-sizing: border-box;
            margin-bottom: 2px;
        }
        .cheat-input:focus { border-color: var(--primary); }

        .cheat-btn {
            padding: 7px 14px;
            font-size: 0.85em;
            width: 100%;
            margin: 0;
        }

        .cheats-disabled-overlay {
            position: relative;
        }
        .cheats-disabled-overlay::after {
            content: "🔒 Cheats disabled on this world";
            position: absolute;
            inset: 0;
            background: rgba(10, 12, 18, 0.75);
            color: var(--text-muted);
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            font-size: 0.9em;
            font-weight: 600;
            cursor: not-allowed;
            backdrop-filter: blur(2px);
        }

        .msg-alert.warning { background: rgba(241, 196, 15, 0.12); color: #f1c40f; }

/* Responsive tweaks */
@media (max-width: 768px) {
    .container { padding: 16px; }
    .tab-bar { gap: 4px; }
    .tab-btn { padding: 8px 12px; font-size: 0.85em; min-width: 80px; }
    .status-card { flex-direction: column; align-items: flex-start; gap: 8px; }
    .btn-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
    .card { padding: 16px; }
    header h1 { font-size: 1.5em; }
    header p { font-size: 0.8em; }
}
@media (max-width: 480px) {
    .tab-btn { font-size: 0.75em; padding: 6px 8px; }
    .action-btn { font-size: 0.8em; padding: 8px; }
    .status-badge { font-size: 0.75em; }
    .status-info h3 { font-size: 1em; }
    .status-info h2 { font-size: 1.1em; }
    .card h3 { font-size: 1em; }
    .cheat-input { font-size: 0.85em; padding: 4px; }
}