@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;400&display=swap');

.backbtn {
    position: fixed;
    z-index: 9999;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #fff;
    color: #333;
    border: 1px solid #333;
    border-radius: 0.25rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
    transition: color 0.3s ease;
    font-family: sans-serif;
    height: 35px;
}

.backbtn:hover {
    background-color: #11d84d;
    color: #fff;
}

body {
    margin: 0;
    padding: 0;
    background: #18182f;
    color: #f4f5ff;
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow: hidden;
}

#portfolio-canvas {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    background: linear-gradient(120deg, #a21caf 0%, #d946ef 100%);
}

#ui-overlay {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

header {
    width: 100vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3vw 1rem 3vw;
    background: rgba(24,24,47,0.7);
    box-shadow: 0 2px 16px 0 rgba(0,0,0,0.08);
    pointer-events: auto;
}

header h1 {
    font-size: 2.2rem;
    margin: 0;
    color: #fff;
    letter-spacing: 0.04em;
}

nav a {
    color: #d946ef;
    text-decoration: none;
    margin-left: 2vw;
    font-weight: 700;
    font-size: 1.1rem;
    transition: color 0.2s;
    pointer-events: auto;
}

nav a:hover {
    color: #fff;
}

section {
    max-width: 520px;
    margin: 3rem 3vw;
    background: rgba(24,24,47,0.85);
    border-radius: 1.2rem;
    padding: 2rem 2.5rem;
    box-shadow: 0 4px 32px 0 rgba(0,0,0,0.10);
    pointer-events: auto;
}

h2 {
    color: #d946ef;
    margin-top: 0;
}

ul {
    padding-left: 1.2em;
}

#instruction-bar {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 320px;
    max-width: 90vw;
    background: rgba(24, 24, 47, 0.55);
    border-radius: 1.2rem;
    box-shadow: 0 4px 32px 0 rgba(0,0,0,0.18);
    z-index: 10;
    padding: 2.1rem 2.5rem 1.7rem 2.5rem;
    text-align: center;
    font-size: 1.18rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: opacity 0.5s, top 0.5s;
    opacity: 1;
}

#instruction-bar.hide {
    opacity: 0;
    pointer-events: none;
}

#instruction-bar span,
#instruction-bar b {
    color: #fff;
    opacity: 1;
}

#speedometer {
    position: fixed;
    right: 2vw;
    bottom: 2vw;
    background: rgba(24, 24, 47, 0.85);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 0.7rem 1.3rem;
    border-radius: 1.2rem;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.10);
    z-index: 10;
    letter-spacing: 0.04em;
    user-select: none;
}

@media (max-width: 700px) {
    section {
        margin: 2rem 1vw;
        padding: 1.2rem 1vw;
    }
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.2rem 2vw 0.5rem 2vw;
    }
    nav a {
        margin-left: 1vw;
        font-size: 1rem;
    }
}

.username {
    font-family: 'Fira Mono', 'Courier New', monospace;
    background: #f5d0fe;
    color: #a21caf;
    border-radius: 0.4rem;
    padding: 0.09rem 0.32rem;
    font-size: 0.97em;
}