:root {
    --primary-color: #00ff41;
    --secondary-color: #ff0080;
    --accent-color: #00d4ff;
    --bg-dark: #0a0a0a;
    --bg-medium: #1a1a1a;
    --bg-light: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --error-color: #ff3864;
    --warning-color: #ffb700;
    --success-color: #00ff41;
    --vh: 1vh; /* Dynamic viewport height for mobile */
}

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

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 65, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    pointer-events: none;
    z-index: 2;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-color);
    z-index: 1000;
    animation: nav-slide-down 1s ease-out;
}

@keyframes nav-slide-down {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.nav-logo h1 {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color); }
    50% { text-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color); }
}

.nav-logo .highlight {
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    z-index: -1;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    transform: scaleX(1);
}

.nav-link:hover,
.nav-link.active {
    color: var(--bg-dark);
    transform: translateY(-2px);
}

.main-content {
    margin-top: 80px;
    position: relative;
    z-index: 10;
}

@media (max-width: 768px) {
    .main-content {
        margin-top: 160px; /* Account for larger mobile nav */
    }
}

.page-section {
    min-height: calc(100vh - 80px);
    padding: 2rem;
    display: none;
    animation: fade-in 0.6s ease-out;
}

.page-section.active {
    display: block;
}

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

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: calc(100vh - 160px);
}

.hero-text h2 {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.glitch-text {
    position: relative;
    color: var(--primary-color);
    animation: glitch-text 3s infinite;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    animation: glitch-1 0.5s infinite;
    color: var(--secondary-color);
    z-index: -1;
}

.glitch-text::after {
    animation: glitch-2 0.5s infinite;
    color: var(--accent-color);
    z-index: -2;
}

@keyframes glitch-text {
    0%, 100% { text-shadow: 0 0 10px var(--primary-color); }
    50% { text-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color); }
}

@keyframes glitch-1 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(20% 0 60% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(50% 0 20% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(10% 0 80% 0); transform: translate(-2px, -1px); }
    80% { clip-path: inset(80% 0 10% 0); transform: translate(1px, 2px); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(60% 0 20% 0); transform: translate(2px, -2px); }
    40% { clip-path: inset(20% 0 60% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(80% 0 10% 0); transform: translate(2px, 1px); }
    80% { clip-path: inset(10% 0 80% 0); transform: translate(-1px, -2px); }
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.stat-card {
    background: rgba(42, 42, 42, 0.8);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.3);
}

.stat-value {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cube-container {
    perspective: 1000px;
}

.cube {
    width: 200px;
    height: 200px;
    position: relative;
    transform-style: preserve-3d;
    animation: cube-rotate 10s linear infinite;
}

@keyframes cube-rotate {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

.cube-face {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(0, 255, 65, 0.1);
    border: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.cube-face.front { transform: translateZ(100px); }
.cube-face.back { transform: rotateY(180deg) translateZ(100px); }
.cube-face.left { transform: rotateY(-90deg) translateZ(100px); }
.cube-face.right { transform: rotateY(90deg) translateZ(100px); }
.cube-face.top { transform: rotateX(90deg) translateZ(100px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(100px); }

/* HOME PAGE ACTION BUTTONS */
.home-action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
    padding: 0 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.action-btn {
    width: 100%;
    height: 80px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.2), rgba(0, 212, 255, 0.2));
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.4);
    position: relative;
    overflow: hidden;
    font-family: 'Orbitron', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.action-btn:hover,
.action-btn:active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--bg-dark);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.8);
    border-color: var(--accent-color);
}

.action-btn .button-text {
    position: relative;
    z-index: 2;
}

.action-btn .button-overlay {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.action-btn:hover .button-overlay {
    left: 100%;
}

.action-btn:active {
    transform: translateY(-1px) scale(1.01);
    transition: all 0.1s ease;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.registration-info {
    margin-bottom: 2rem;
}

.info-box {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.info-box h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Orbitron', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-box p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.current-key-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(42, 42, 42, 0.8);
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    margin-top: 1rem;
}

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

.key-value {
    color: var(--accent-color);
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 2px;
    flex: 1;
    padding: 0.5rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    text-align: center;
}

.mini-button {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

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

.cyber-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
}

.cyber-input {
    width: 100%;
    padding: 1rem;
    background: rgba(42, 42, 42, 0.8);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.cyber-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.cyber-input:focus + .input-line {
    width: 100%;
}

.cyber-button {
    position: relative;
    width: 100%;
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 1;
}

.cyber-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: left 0.3s ease;
    z-index: -1;
}

.cyber-button:hover::before {
    left: 0;
}

.cyber-button:hover {
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 255, 65, 0.3);
}

.platform-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.platform-option {
    background: rgba(42, 42, 42, 0.8);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.platform-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.platform-option.selected {
    border-color: var(--primary-color);
    background: rgba(0, 255, 65, 0.1);
}

.platform-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.platform-option h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.platform-option p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.connection-info {
    font-size: 0.8rem;
    color: var(--accent-color);
    word-break: break-all;
}

.success-panel {
    text-align: center;
    padding: 3rem;
    background: rgba(0, 255, 65, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    animation: success-appear 0.6s ease-out;
}

@keyframes success-appear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 1rem;
    animation: success-pulse 1s ease-in-out infinite;
}

@keyframes success-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.success-panel h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--success-color);
}

.connection-details {
    background: rgba(42, 42, 42, 0.8);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.connection-details h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-family: 'Orbitron', monospace;
}

.admin-login-container {
    max-width: 400px;
    margin: 0 auto;
}

.admin-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(42, 42, 42, 0.8);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.current-token {
    font-family: 'Orbitron', monospace;
}

.token-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.token-value {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.admin-actions {
    display: flex;
    gap: 1rem;
}

.admin-tabs {
    display: flex;
    background: rgba(42, 42, 42, 0.8);
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.tab-button {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: rgba(0, 255, 65, 0.1);
}

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

.tab-content {
    display: none;
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid var(--primary-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 2rem;
    animation: tab-appear 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

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

.logs-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.logs-viewer {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    padding: 1rem;
    height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.log-entry {
    padding: 0.5rem;
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
    word-wrap: break-word;
}

.log-entry:hover {
    background: rgba(0, 255, 65, 0.05);
}

.users-table-container {
    overflow-x: auto;
}

.cyber-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(42, 42, 42, 0.8);
    border: 1px solid var(--primary-color);
}

.cyber-table th {
    background: var(--primary-color);
    color: var(--bg-dark);
    padding: 1rem;
    text-align: left;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cyber-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
}

.cyber-table tr:hover {
    background: rgba(0, 255, 65, 0.05);
}

.ai-chat-container {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.ai-message {
    margin-bottom: 1rem;
    padding: 0.8rem;
    border-radius: 8px;
    max-width: 80%;
}

.ai-message.user {
    background: rgba(0, 255, 65, 0.2);
    align-self: flex-end;
}

.ai-message.system {
    background: rgba(0, 212, 255, 0.2);
    align-self: flex-start;
}

.ai-message .message-text {
    word-wrap: break-word;
}

.ai-input-container {
    display: flex;
    gap: 1rem;
}

.ai-input-container .cyber-input {
    flex: 1;
}

.ai-input-container .cyber-button {
    width: auto;
    padding: 1rem 2rem;
}

.globist-container {
    max-width: 1200px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-card-large {
    background: rgba(42, 42, 42, 0.8);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card-large:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.3);
}

.stat-card-large h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.info-container {
    max-width: 1200px;
    margin: 0 auto;
}

.info-section {
    margin-bottom: 3rem;
}

.info-section h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-card {
    background: rgba(42, 42, 42, 0.8);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.info-card h4 {
    font-family: 'Orbitron', monospace;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-card p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--bg-light);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.hidden {
    display: none !important;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-button {
    background: #1a1a1a;
    color: #00ff41;
    border: 1px solid #00ff41;
    padding: 10px 20px;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button.active {
    background: #00ff41;
    color: #000;
}

.tab-button:hover {
    background: #00ff41;
    color: #000;
}

/* Force side navigation on all small screens - BACKUP */
@media screen and (max-width: 1024px) {
    .main-nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 80px !important;
        height: 100vh !important;
        z-index: 1000 !important;
        background: linear-gradient(135deg, rgba(26, 26, 26, 0.98), rgba(0, 255, 65, 0.1)) !important;
        border-right: 3px solid var(--primary-color) !important;
        display: flex !important;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5) !important;
    }
    
    .nav-menu {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
        padding: 2rem 0 !important;
        list-style: none !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .nav-menu li {
        list-style: none !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    .nav-link {
        display: flex !important;
        width: 60px !important;
        height: 60px !important;
        margin: 0 auto !important;
        border: 3px solid var(--primary-color) !important;
        border-radius: 50% !important;
        background: rgba(0, 255, 65, 0.2) !important;
        color: var(--primary-color) !important;
        text-decoration: none !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;
        font-size: 0.6rem !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 0 20px rgba(0, 255, 65, 0.4) !important;
        cursor: pointer !important;
        position: relative !important;
    }
    
    .nav-link:hover {
        transform: scale(1.2) !important;
        background: var(--primary-color) !important;
        color: var(--bg-dark) !important;
        box-shadow: 0 0 40px rgba(0, 255, 65, 1) !important;
    }
    
    .main-content {
        margin-left: 80px !important;
        margin-top: 0 !important;
        padding: 2rem 1rem !important;
    }
    
    /* Hide logo to make room for buttons */
    .nav-logo {
        display: none !important;
    }
}

/* Tablet Optimizations */
@media (max-width: 1024px) {
    .hero-content {
        gap: 2rem;
    }
    
    .hero-text h2 {
        font-size: 2.8rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .admin-tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        flex: 1;
        min-width: 120px;
        font-size: 0.8rem;
    }
}

/* Mobile Optimizations */
@media (max-width: 1024px) { /* Use larger breakpoint to catch phones */
    /* SIDE NAVIGATION PANEL - ALWAYS VISIBLE */
    .main-nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 80px !important;
        height: 100vh !important;
        z-index: 1000 !important;
        background: rgba(26, 26, 26, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        border-right: 2px solid var(--primary-color) !important;
        display: flex !important;
    }
    
    .nav-container {
        padding: 1rem 0.5rem !important;
        flex-direction: column !important;
        align-items: center !important;
        height: 100% !important;
        display: flex !important;
    }
    
    .nav-logo {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .nav-logo h1 {
        font-size: 0.8rem;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        letter-spacing: 2px;
    }
    
    .nav-menu {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        padding: 0 !important;
        background: transparent !important;
        position: static !important;
        width: 100% !important;
        list-style: none !important;
        margin: 0 !important;
    }
    
    .nav-menu li {
        list-style: none;
        width: 100%;
        text-align: center;
    }
    
    .nav-link {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 60px !important;
        height: 60px !important;
        font-size: 0.7rem !important;
        text-align: center !important;
        border: 2px solid var(--primary-color) !important;
        border-radius: 50% !important;
        background: rgba(0, 255, 65, 0.1) !important;
        color: var(--primary-color) !important;
        text-decoration: none !important;
        transition: all 0.3s ease !important;
        margin: 0 auto !important;
        position: relative !important;
        overflow: hidden !important;
        flex-direction: column !important;
        line-height: 1.2 !important;
        cursor: pointer !important;
        box-shadow: 0 0 15px rgba(0, 255, 65, 0.3) !important;
    }
    
    .nav-link::before {
        content: attr(data-short);
        font-size: 1.2rem;
        margin-bottom: 2px;
    }
    
    .nav-link::after {
        content: attr(data-text);
        font-size: 0.6rem;
        line-height: 1;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: var(--primary-color) !important;
        color: var(--bg-dark) !important;
        transform: scale(1.1) !important;
        box-shadow: 0 0 30px rgba(0, 255, 65, 0.8) !important;
        border-color: var(--accent-color) !important;
    }
    
    /* Hide the broken hamburger menu */
    .mobile-menu-toggle {
        display: none !important;
    }
    
    /* Adjust main content for side nav */
    .main-content {
        margin-left: 80px !important;
        margin-top: 0 !important;
        min-height: 100vh !important;
        padding: 2rem 1rem !important;
    }
}
    .nav-container {
        padding: 0.75rem 1rem;
        justify-content: space-between;
        align-items: center;
    }
    
    .nav-logo h1 {
        font-size: 1.4rem;
    }
    
    .nav-menu {
        display: flex !important; /* Override default flex */
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 2px solid var(--primary-color);
        z-index: 999;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        display: flex;
    }
    
    .nav-link {
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid rgba(0, 255, 65, 0.2);
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Mobile Menu Toggle - FORCE DISPLAY */
    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: 2px solid var(--primary-color);
        color: var(--primary-color);
        padding: 0.5rem;
        cursor: pointer;
        border-radius: 4px;
        font-size: 1.5rem;
        line-height: 1;
        transition: all 0.3s ease;
        z-index: 1001;
        position: relative;
    }
    
    .mobile-menu-toggle:hover {
        background: var(--accent-color) !important;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 255, 65, 0.3);
    }
    
    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 1rem;
    }
    
    .hero-text h2 {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .stat-card {
        padding: 1.2rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    /* 3D Cube - Smaller on mobile */
    .cube {
        width: 150px;
        height: 150px;
    }
    
    .cube-face {
        width: 150px;
        height: 150px;
        font-size: 1.5rem;
    }
    
    .cube-face.front { transform: translateZ(75px); }
    .cube-face.back { transform: rotateY(180deg) translateZ(75px); }
    .cube-face.left { transform: rotateY(-90deg) translateZ(75px); }
    .cube-face.right { transform: rotateY(90deg) translateZ(75px); }
    .cube-face.top { transform: rotateX(90deg) translateZ(75px); }
    .cube-face.bottom { transform: rotateX(-90deg) translateZ(75px); }
    
    /* Forms */
    .cyber-form {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .cyber-input {
        padding: 0.875rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Platform Selector */
    .platform-selector {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .platform-option {
        padding: 1.5rem;
    }
    
    .platform-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }
    
    .connection-info {
        font-size: 0.75rem;
        word-break: break-all;
    }
    
    /* Registration Key Display */
    .current-key-display {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .key-value {
        font-size: 1rem;
        word-break: break-all;
    }
    
    /* Admin Section */
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .current-token {
        text-align: center;
    }
    
    .token-value {
        font-size: 1rem;
        word-break: break-all;
    }
    
    .admin-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .admin-actions .cyber-button {
        width: 100%;
    }
    
    .mini-button {
        width: 100%;
        justify-content: center;
    }
    
    /* Tabs */
    .admin-tabs {
        flex-direction: column;
        gap: 0;
    }
    
    .tab-button {
        border-bottom: 1px solid rgba(0, 255, 65, 0.2);
    }
    
    .tab-button:last-child {
        border-bottom: none;
    }
    
    .tab-content {
        padding: 1rem;
        border-radius: 8px;
    }
    
    /* Quick Whitelist Form */
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Logs Section */
    .logs-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .logs-controls {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .logs-viewer {
        height: 300px;
        font-size: 0.8rem;
        padding: 0.75rem;
    }
    
    /* AI Assistant */
    .ai-chat-container {
        height: 350px;
    }
    
    .ai-input-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .ai-input-container .cyber-button {
        width: 100%;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card-large {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Info Section */
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    /* Buttons */
    .cyber-button {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Success Panel */
    .success-panel {
        padding: 2rem 1rem;
        margin: 0 1rem;
    }
    
    /* Tables */
    .cyber-table {
        font-size: 0.8rem;
    }
    
    .cyber-table th,
    .cyber-table td {
        padding: 0.75rem 0.5rem;
    }
    
    /* Notifications */
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    /* Make side nav even more compact */
    .main-nav {
        width: 60px;
    }
    
    .nav-logo h1 {
        font-size: 0.7rem;
    }
    
    .nav-link {
        width: 45px;
        height: 45px;
        font-size: 0.6rem;
    }
    
    .nav-link::before {
        font-size: 1rem;
    }
    
    .nav-link::after {
        font-size: 0.5rem;
    }
    
    .main-content {
        margin-left: 60px;
    }
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .hero-text h2 {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .cube {
        width: 120px;
        height: 120px;
    }
    
    .cube-face {
        width: 120px;
        height: 120px;
        font-size: 1.25rem;
    }
    
    .cube-face.front { transform: translateZ(60px); }
    .cube-face.back { transform: rotateY(180deg) translateZ(60px); }
    .cube-face.left { transform: rotateY(-90deg) translateZ(60px); }
    .cube-face.right { transform: rotateY(90deg) translateZ(60px); }
    .cube-face.top { transform: rotateX(90deg) translateZ(60px); }
    .cube-face.bottom { transform: rotateX(-90deg) translateZ(60px); }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .cyber-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .platform-option {
        padding: 1rem;
    }
    
    .platform-icon {
        font-size: 2rem;
    }
    
    .tab-content {
        padding: 0.75rem;
    }
    
    .logs-viewer {
        height: 250px;
        font-size: 0.75rem;
    }
    
    .ai-chat-container {
        height: 300px;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .cyber-button:hover::before {
        left: 0;
        transform: scaleX(0);
        transition: none;
    }
    
    .cyber-button:active::before {
        left: 0;
        transform: scaleX(1);
    }
    
    .cyber-button:active {
        transform: translateY(-1px);
    }
    
    .platform-option:active {
        transform: translateY(-2px);
    }
    
    .stat-card:active {
        transform: translateY(-2px);
    }
    
    .nav-link:active {
        transform: translateY(-1px);
    }
    
    .tab-button:active {
        transform: translateY(-1px);
    }
    
    /* Improve touch targets */
    .cyber-button,
    .nav-link,
    .tab-button,
    .platform-option {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better scrolling on iOS */
    .logs-viewer,
    .ai-messages {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Prevent momentum scrolling issues */
    body {
        overscroll-behavior: contain;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    /* Reduce animation complexity on mobile */
    .cyber-grid {
        animation-duration: 30s;
    }
    
    .scanline {
        animation-duration: 12s;
    }
    
    .cube {
        animation-duration: 15s;
    }
    
    /* Optimize GPU usage */
    .hero-text,
    .stat-card,
    .platform-option {
        transform: translateZ(0);
        backface-visibility: hidden;
    }
    
    /* Reduce box shadows for performance */
    .cyber-button:hover {
        box-shadow: none;
    }
    
    .stat-card:hover {
        box-shadow: none;
    }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .hero-text {
        margin-bottom: 1rem;
    }
    
    .cube-container {
        margin: 1rem 0;
    }
    
    .registration-info {
        margin-bottom: 1rem;
    }
    
    .info-box {
        padding: 1rem;
    }
    
    .current-key-display {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .key-value {
        flex: 1;
        min-width: 150px;
    }
}