/* Failborg CSS - Failed Cyborgs of the Future */

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

body {
    font-family: 'Courier New', monospace;
    background-color: #0a0a0a;
    color: #00ff00;
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    padding-bottom: 0;
    width: 100%;
}

.title {
    text-align: center;
    font-size: 3rem;
    letter-spacing: 0.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px #00ff00, 0 0 40px #00ff00;
    animation: glitch 2s infinite;
}

.subtitle {
    text-align: center;
    font-size: 1rem;
    color: #888;
    margin-bottom: 2rem;
    font-style: italic;
}

@keyframes glitch {
    0%, 100% {
        text-shadow: 0 0 20px #00ff00, 0 0 40px #00ff00;
    }
    95% {
        text-shadow: 3px 0 20px #ff0000, -3px 0 20px #0000ff;
    }
}

#canvas-container {
    width: 100%;
    height: calc(100vh - 220px);
    min-height: 300px;
    margin: 0 auto;
    border: 2px solid #00ff00;
    border-left: none;
    border-right: none;
    box-shadow: 0 0 30px #00ff00;
    position: relative;
    background: radial-gradient(ellipse at center, #111 0%, #000 100%);
    margin-bottom: 60px; /* Space for bottom nav */
}

#canvas-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000;
    border-top: 2px solid #00ff00;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0, 255, 0, 0.3);
}

.nav-buttons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0;
    max-width: 600px;
    margin: 0 auto;
}

.nav-btn, .random-nav-btn {
    flex: 1;
    background: none;
    border: none;
    color: #00ff00;
    padding: 12px 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
}

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

.nav-btn.active {
    background: rgba(0, 255, 0, 0.2);
}

.nav-btn .icon, .random-nav-btn .icon {
    font-size: 1.5rem;
    filter: grayscale(1) brightness(0) invert(1);
}

.nav-btn .label, .random-nav-btn .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

/* Fold-out Menus */
.fold-menu {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: #111;
    border: 2px solid #00ff00;
    border-bottom: none;
    padding: 20px;
    transition: bottom 0.3s ease;
    z-index: 999;
    max-height: 60vh;
    overflow-y: auto;
    box-shadow: 0 -10px 30px rgba(0, 255, 0, 0.3);
}

.fold-menu.active {
    bottom: 60px;
}

.fold-menu h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: #00ff00;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    font-size: 1.2rem;
}

/* Close button for fold menus */
.close-menu-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: 2px solid #00ff00;
    color: #00ff00;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: inherit;
    line-height: 1;
    padding: 0;
}

.close-menu-btn:hover {
    background: #00ff00;
    color: #000;
    transform: rotate(90deg);
}

.fold-menu h4 {
    margin: 1rem 0 0.5rem;
    color: #00ff00;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.arm-section, .leg-section {
    margin-bottom: 1rem;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    border-radius: 5px;
}

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

.option-btn {
    background: #111;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 8px 16px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    border-radius: 3px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.option-btn:hover {
    background: #00ff00;
    color: #000;
    box-shadow: 0 0 10px #00ff00;
    transform: translateY(-2px);
}

.option-btn.active {
    background: #00ff00;
    color: #000;
    box-shadow: 0 0 15px #00ff00;
}

.random-nav-btn {
    background: linear-gradient(45deg, #ff0000, #00ff00, #0000ff);
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

.random-nav-btn:hover {
    transform: scale(1.05);
}

/* Overlay for closing menus */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

.menu-overlay.active {
    display: block;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}


/* Mobile responsive */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
        letter-spacing: 0.2rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    #canvas-container {
        width: 100%;
        height: calc(100vh - 200px);
    }
    
    .fold-menu {
        max-height: 50vh;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    #canvas-container {
        height: calc(100vh - 195px);
    }
    
    .nav-btn .label, .random-nav-btn .label {
        font-size: 0.65rem;
    }
    
    .option-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* Loading animation */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ff00, transparent);
    animation: scan 3s linear infinite;
    z-index: 9999;
}

@keyframes scan {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}