/* ==================== CUSTOM PROPERTIES ==================== */
:root {
    --primary-color: #00f5ff;
    --secondary-color: #7c3aed;
    --accent-color: #ff006e;
    --success-color: #00ff88;
    --warning-color: #ffaa00;
    --danger-color: #ff3366;
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --bg-card: #13131a;
    --bg-card-hover: #1a1a24;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;
    --gradient-1: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-2: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    --gradient-3: linear-gradient(135deg, #00f5ff, #7c3aed, #ff006e);
    --shadow-sm: 0 2px 8px rgba(0, 245, 255, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 245, 255, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 245, 255, 0.3);
    --shadow-glow: 0 0 20px rgba(0, 245, 255, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 70px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 245, 255, 0.1);
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.logo-text .highlight {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ==================== MAIN LAYOUT ==================== */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ==================== STATUS CARDS ==================== */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.status-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 245, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-1);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.status-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.status-card:hover::before {
    transform: scaleY(1);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.status-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-icon {
    font-size: 1.5rem;
}

.status-icon.online {
    color: var(--success-color);
}

.status-icon.offline {
    color: var(--danger-color);
}

.status-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.status-info {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* ==================== TABS ==================== */
.tabs-container {
    margin-bottom: 2rem;
}

.tabs-nav {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid rgba(0, 245, 255, 0.1);
    margin-bottom: 2rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-card);
}

.tab-button {
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--primary-color);
}

.tab-button.active::after {
    width: 100%;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* ==================== CONSOLE ==================== */
.console-container {
    background: var(--bg-card);
    border: 1px solid rgba(0, 245, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
}

.console-header {
    background: var(--bg-darker);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 245, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.console-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.console-actions {
    display: flex;
    gap: 0.5rem;
}

.console-btn {
    padding: 0.5rem 1rem;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.console-btn:hover {
    background: rgba(0, 245, 255, 0.2);
    border-color: var(--primary-color);
}

.console-output {
    height: 400px;
    overflow-y: auto;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background: #000000;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #000000;
}

.console-output::-webkit-scrollbar {
    width: 8px;
}

.console-output::-webkit-scrollbar-track {
    background: #000000;
}

.console-output::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.console-line {
    margin-bottom: 0.25rem;
    padding: 0.25rem;
    border-radius: 3px;
}

.console-line.info {
    color: var(--primary-color);
}

.console-line.warn {
    color: var(--warning-color);
}

.console-line.error {
    color: var(--danger-color);
    background: rgba(255, 51, 102, 0.1);
}

.console-line.success {
    color: var(--success-color);
}

.console-timestamp {
    color: var(--text-muted);
    margin-right: 0.5rem;
}

.console-input-container {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0, 245, 255, 0.1);
    background: var(--bg-darker);
}

.console-input-wrapper {
    display: flex;
    gap: 1rem;
}

.console-input {
    flex: 1;
    padding: 0.75rem;
    background: var(--bg-card);
    border: 2px solid rgba(0, 245, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.console-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.console-send {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.console-send:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* ==================== PLAYERS TABLE ==================== */
.section-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 245, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-box {
    padding: 0.5rem 1rem;
    background: var(--bg-darker);
    border: 2px solid rgba(0, 245, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    width: 250px;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-color);
}

.table-wrapper {
    overflow-x: auto;
}

.players-table {
    width: 100%;
    border-collapse: collapse;
}

.players-table thead tr {
    background: var(--bg-darker);
}

.players-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.players-table td {
    padding: 1rem;
    border-top: 1px solid rgba(0, 245, 255, 0.1);
}

.players-table tbody tr {
    transition: var(--transition);
    cursor: pointer;
}

.players-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.player-name {
    font-weight: 600;
    color: var(--text-primary);
}

.player-uuid {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: monospace;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.status-badge.online {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.status-badge.offline {
    background: rgba(107, 107, 123, 0.2);
    color: var(--text-muted);
    border: 1px solid var(--text-muted);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 8px;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: rgba(0, 245, 255, 0.2);
    transform: translateY(-2px);
}

.action-btn.danger:hover {
    background: rgba(255, 51, 102, 0.2);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 15px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 245, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 51, 102, 0.2);
    border-radius: 8px;
    color: var(--danger-color);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 51, 102, 0.2);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(0, 245, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ==================== INVENTORY GRID ==================== */
.inventory-section {
    margin-bottom: 2rem;
}

.inventory-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 0.5rem;
    background: var(--bg-darker);
    padding: 1rem;
    border-radius: 10px;
}

.inventory-slot {
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 2px solid rgba(0, 245, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.inventory-slot:hover {
    border-color: var(--primary-color);
    background: var(--bg-card-hover);
    transform: scale(1.05);
}

.inventory-slot.has-item {
    background: rgba(0, 245, 255, 0.05);
    border-color: rgba(0, 245, 255, 0.3);
}

.item-count {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.inventory-slot:empty::after {
    content: '';
    width: 20px;
    height: 20px;
    background: rgba(0, 245, 255, 0.05);
    border-radius: 4px;
}

/* ==================== MODS SECTION ==================== */
.mods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.mod-card {
    background: var(--bg-darker);
    border: 1px solid rgba(0, 245, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
}

.mod-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.mod-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.mod-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.mod-version {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mod-toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

.mod-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--text-muted);
    transition: 0.4s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.mod-toggle input:checked + .toggle-slider {
    background: var(--gradient-1);
}

.mod-toggle input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.mod-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.mod-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 245, 255, 0.1);
}

.mod-author {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mod-actions {
    display: flex;
    gap: 0.5rem;
}

.mod-action-btn {
    padding: 0.5rem;
    background: transparent;
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 6px;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.mod-action-btn:hover {
    background: rgba(0, 245, 255, 0.1);
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-darker);
    border: 2px solid rgba(0, 245, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-primary {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(0, 245, 255, 0.1);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 968px) {
    .status-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .console-output {
        height: 300px;
    }

    .inventory-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .mods-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .main-container {
        padding: 1rem;
    }

    .dashboard-title {
        font-size: 2rem;
    }

    .tabs-nav {
        gap: 0.5rem;
    }

    .tab-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .console-input-wrapper {
        flex-direction: column;
    }

    .inventory-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.25rem;
        padding: 0.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .search-box {
        width: 100%;
    }

    .players-table {
        font-size: 0.85rem;
    }

    .players-table th,
    .players-table td {
        padding: 0.75rem 0.5rem;
    }
}
