.playground {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1; /* fill remaining space */
    gap: 0;
    width: 100%;
}

/* Keywords */
.cm-roscript-keyword {
  color: #61dafb; /* light blue */
  font-weight: bold;
}

/* Operator styling */
.cm-roscript-operator {
  color: #ff79c6; /* pink */
  font-weight: bold;
}

/* User-defined function styling */
.cm-roscript-function {
  color: #50fa7b; /* green */
  font-style: italic;
}

.cm-roscript-operator {
  color: #ff79c6; /* pink, visible on Cobalt theme */
  font-weight: bold;
}

.editor {
    display: grid;
    grid-template-rows: 1fr auto;
    padding: 0.5rem;
    background: #181a20;
    border-right: 1px solid #2b2f3a;
    overflow: auto; /* scrollable if content grows */
    max-height: 80vh; /* optional: limit editor height */
}

.output {
    padding: 0.5rem;
    background: #0f1116;
    display: flex;
    flex-direction: column;
    overflow: auto; /* scrollable output */
    max-height: 80vh; /* optional: limit output height */
}

footer {
    text-align: center;
    font-size: 16px;
    padding: 20px 0;
    border-top: 1px solid #2b2f3a;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Segoe UI", Roboto, sans-serif;
    background: #0f1116;
    color: #e8e8e8;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    flex: 1 0 auto; /* container grows naturally */
    display: flex;
    flex-direction: column;
    align-items: center;
}



.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center; /* ensures vertical centering */
    height: 70px;
    padding: 0 2rem;
    background: linear-gradient(90deg, #20222a, #2b2f3a);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.navbar .logo {
    display: flex;
    align-items: center; /* vertical centering */
}

.navbar .logo img {
    max-height: 50px;
    width: auto;
    display: block;
    /* glow effect */
    filter: drop-shadow(0 0 2px rgba(97, 218, 251, 0.7))
            drop-shadow(0 0 4px rgba(97, 218, 251, 0.5));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.navbar .logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 5px rgba(97, 218, 251, 0.9))
            drop-shadow(0 0 10px rgba(97, 218, 251, 0.7));
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.navbar a {
    text-decoration: none;
    color: #e0e0e0;
    font-weight: 500;
}

.navbar a:hover {
    color: #61dafb;
}

.CodeMirror {
    height: 100%;
    background: #282a36 !important; /* Dracula editor background */
    color: #f8f8f2;      /* Default text color */
    font-family: monospace;
    font-size: 1rem;
}

/* Line numbers (gutter) */
.CodeMirror-gutters {
    background-color: #282a36 !important; /* match Dracula bg */
    border-right: 1px solid #44475a; /* subtle border like Dracula */
}

.CodeMirror-linenumber {
    color: #6272a4; /* Dracula line number color */
}

.button-container {
    margin-top: 0.5rem;
}

button {
    width: 100%;
    padding: 0.6rem;
    border-radius: 8px;
    border: none;
    background: #61dafb;
    color: #0f1116;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    background: #52c2e3;
}

button:active {
    transform: scale(0.97);
    background: #4bb8d4;
}

pre {
    flex: 1;
    margin: 0;
    background: #11131a;
    border: 1px solid #2b2f3a;
    border-radius: 8px;
    padding: 1rem;
    color: #61dafb;
    font-family: monospace;
    font-size: 1.1rem; /* <-- increased from 1rem */
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Mobile scaling for screens ≤ 1200px */
@media (max-width: 1200px) {
    /* Playground layout */
    .playground {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 1rem;
    }

    /* Editor */
    .editor {
        max-height: 70vh;
        padding: 1.2rem; /* slightly bigger padding */
    }

    .CodeMirror {
        font-size: 2.5rem !important; /* 20% bigger */
    }

    .CodeMirror-gutters {
        font-size: 1.2rem; /* line numbers 20% bigger */
    }

    /* Output */
    .output {
        max-height: 70vh;
        font-size: 2.5rem; /* 20% bigger */
        padding: 1.2rem;
    }

    pre {
        font-size: 2.5rem; /* 20% bigger */
    }

    /* Button */
    button {
        font-size: 2.2rem; /* 20% bigger */
        padding: 1rem 1.2rem;
    }

    /* Navbar */
    .navbar {
        height: 150px; /* 50% taller */
        padding: 0 3rem;
    }

    .navbar a {
        font-size: 2rem; /* 50% bigger links */
    }

    .navbar .logo img {
        max-height: 100px; /* 50% bigger logo */
    }

    /* Container text */
    .container, .container p, h1 {
        font-size: 1.2rem; /* 20% bigger */
    }
}



