body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 20px;
    color: #333;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}


.logo {
    display: flex;
    align-items: flex-end;
    gap: 0.4rem;
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 800;
}

.logo-sjcoe {
    font-size: clamp(1.6rem, 1.4vw + 1.2rem, 2.4rem);
    letter-spacing: 0.12em;
    color: #111;
}

.logo-fablab {
    display: flex;
    gap: 0.1rem;
    font-size: clamp(1.6rem, 1.4vw + 1.2rem, 2.4rem);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.fab-letter {
    display: inline-block;
    position: relative;
    padding: 0 0.05em;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

.fab-letter::after {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: -0.35em;
    height: 0.35em;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.2;
    filter: blur(4px);
}

.fab-red { color: #cf1b2f; }
.fab-orange { color: #ff7a21; }
.fab-yellow { color: #f2c300; }
.fab-blue { color: #0b6dff; }
.fab-green { color: #16a34a; }
.fab-magenta { color: #c026d3; }

header h1 {
    font-size: clamp(2.2rem, 2.5vw + 1rem, 3.5rem);
    font-weight: 800;
    letter-spacing: 0.1em;
    margin: 0;
    background: linear-gradient(90deg, #0ff4ff 0%, #44ff7a 45%, #00a8ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-stroke: 2px #0b1133;
    text-shadow: 4px 4px 0 rgba(11, 17, 51, 0.75), 8px 8px 14px rgba(0, 0, 0, 0.45);
    text-transform: uppercase;
}


.container {
    display: flex;
    gap: 20px;
    height: 70vh;
}

.controls {
    display: flex;
    flex-direction: column;
    width: 30%;
    gap: 15px;
}

.info-box {
    border: 2px solid #ccc;
    border-radius: 15px;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.connect-button {
    padding: 15px 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    background: linear-gradient(to bottom, #4a90e2, #0056b3);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.2s ease-in-out;
}

.connect-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.states-button {
    padding: 12px 18px;
    font-size: 1.05em;
    font-weight: 600;
    color: #0b1133;
    background: linear-gradient(to bottom, #f8f9fa, #d7e4ff);
    border: 2px solid #4a90e2;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background 0.3s ease-in-out;
}

.states-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(0,0,0,0.2);
}

.states-button.active {
    background: linear-gradient(to bottom, #44ff7a, #0dd26c);
    color: #fff;
    border-color: #0a9750;
    box-shadow: 0 6px 12px rgba(13, 210, 108, 0.4);
}

.molecule-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.mol-button {
    padding: 20px;
    font-size: 1.5em;
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.2s, border-color 0.2s;
}

.mol-button span {
    display: block;
    font-size: 0.6em;
    margin-top: 5px;
    color: #555;
}

.mol-button:hover, .mol-button.active {
    background-color: #e0e0e0;
    border-color: #4a90e2;
}

.viewing-space {
    flex-grow: 1;
    background-color: #000;
    border-radius: 15px;
    position: relative;
    overflow: hidden; /* Ensures canvas stays within borders */
}

#canvas-container canvas {
    border-radius: 15px;
}

.placeholder-text {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #888;
    font-size: 1.5em;
}
