:root {
    /* Core Dark Theme - Deeper darks, brighter accents */
    --primary-bg: #121212;
    --primary-text: #E0E0E0;
    --secondary-bg: #1E1E1E; 
    --header-accent: #AE8FF7; 

    /* Borders for Dark Mode - Light and subtle */
    --border-strong: rgba(255, 255, 255, 0.2);
    --border-medium: rgba(255, 255, 255, 0.15);
    --border-light: rgba(255, 255, 255, 0.1);

    /* Shadows for Dark Mode */
    --shadow-strong: rgba(0,0,0,0.5);
    --shadow-soft: rgba(0,0,0,0.3);

    /* Accent Colors */
    --accent-blue: #6699FF; 
    --accent-blue-darker: #4A75D1;
    --accent-gradient-start: #078EFB;
    --accent-gradient-end: #AC87EB;

    --accent-green: #81C784; 
    --accent-green-dark: #2E7D32;

    --accent-purple-dark: #3A2D5A; 
    --accent-purple-light-text: #E1BEE7; 

    /* Buttons - Modernized */
    --button-primary-bg: linear-gradient(90deg, var(--accent-gradient-start), var(--accent-gradient-end));
    --button-primary-text: #FFFFFF;
    --button-primary-hover-bg: linear-gradient(90deg, #067DD9, #9A76D0); 
    --button-primary-focus-shadow: rgba(174, 143, 247, 0.4); 

    --button-secondary-bg: rgba(255, 255, 255, 0.1);
    --button-secondary-text: var(--primary-text);
    --button-secondary-hover-bg: rgba(255, 255, 255, 0.15);
    --button-secondary-border: var(--border-medium);

    --button-disabled-text: #757575;
    --button-disabled-bg: rgba(255, 255, 255, 0.05);
    --button-secondary-disabled-bg: rgba(255, 255, 255, 0.05);
    --button-secondary-disabled-text: #757575;

    --text-muted: #9E9E9E;

    /* Highlights */
    --highlight-bg: rgba(7,142,251,0.5);
    --highlight-border: rgba(172,135,235,0.5); 
    --highlight-text: #FFFFFF; 

    /* Error States */
    --error-text: #FF7675; 
    --error-bg-soft: rgba(255, 118, 117, 0.1);
    --error-bg-soft-stronger: rgba(255, 118, 117, 0.15);
    --error-fill-dark: #7D2A29; 
    --error-text-light: #FAB1A0; 

    /* PDA Specific Colors */
    --pda-start-bg: var(--accent-green-dark);
    --pda-start-stroke: var(--accent-green);
    --pda-start-text: var(--primary-text);

    --pda-accept-bg: var(--accent-purple-dark);
    --pda-accept-stroke: var(--header-accent);
    --pda-accept-inner-stroke: #D1A0EA; 
    --pda-accept-text: var(--accent-purple-light-text);

    --pda-reject-bg: var(--error-fill-dark);
    --pda-reject-stroke: var(--error-text);
    --pda-reject-text: var(--error-text-light);

    --pda-processing-bg: #333333; 
    --pda-processing-stroke: var(--border-medium);

    --pda-highlight-bg: var( --highlight-bg);
    --pda-highlight-stroke: var(--highlight-border);
    --pda-highlight-text: var(--highlight-text);


    --pda-transition-path-stroke: var(--border-medium);
    --pda-transition-path-label: var(--text-muted);
    --pda-arrowhead-fill: var(--pda-transition-path-stroke);

    
    --transparent: transparent;
}

.circle {
height: 24px;
width: 24px;
border-radius: 24px;
background-color: black;
position: fixed; 
top: 0;
left: 0;
pointer-events: none;
z-index: 99999999; 
}

.logo-container {
display: flex;
justify-content: center;
align-items: center;
min-height: 150px;
border-bottom: 1px solid var(--border-medium);
gap: 2em;
}

.logo {
 width: 100px;
 height: 100px;
}

.bracket-left, .bracket-right, .slash {
 stroke-dasharray: 200; 
 stroke-dashoffset: 200;
 animation: draw-purple 2s ease-in-out infinite;
}

.angle-left, .angle-right {
 stroke-dasharray: 60; 
 stroke-dashoffset: 60; 
 animation: draw-grey 2s ease-in-out infinite;
}

.slash{
    stroke-dasharray: 35;
    stroke-dashoffset: 35;
    animation: draw-purple 2s ease-in-out infinite;
}

@keyframes draw-purple {
 to {
 stroke-dashoffset: 0;
 }
}

@keyframes draw-grey {
 to {
 stroke-dashoffset: 0;
 }
}

body {
    font-family: 'Google Sans', Arial, sans-serif; 
    line-height: 1.6;
    margin: 20px;
    background-color: var(--primary-bg);
    color: var(--primary-text);
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale;
    cursor: none;
}


h2, h3 {
    margin-bottom: 0.5em;
    color: var(--header-accent);
    font-weight: 500; 
    padding-bottom: 0.2em;
    cursor: none;
}

h1 {
    text-align: center;
    font-size: 2.3em; 
    font-weight: 800; 
    cursor: none;
    color: var(--header-accent);
    /* color: var(--primary-text); */
}

h2 {
    border-bottom: 1px dashed var(--border-light);
    font-size: 1.6em;
}

h3 {
    font-size: 1.3em;
}

/* --- Header Stuff --- */
.header-container {
    display: flex;
    justify-content: center; 
    max-width: 100%;
    padding: 0 20px;
    gap: 1rem;
}

/* --- Layout Container --- */
.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 20px;
}

.controls, .results, .visualization {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-light);
    padding: 20px;
    border-radius: 8px; 
    box-shadow: 0 4px 8px var(--shadow-soft);
}

.visualization {
     grid-column: 1 / -1;
     margin-top: 20px;
}

/* --- Controls Styling --- */
label {
    display: inline-block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-text);
    font-size: 0.9em;
}

input[type="text"], select {
    padding: 12px 15px; 
    margin-bottom: 15px;
    border: 1px solid var(--border-medium);
    border-radius: 24px; 
    width: calc(100% - 32px); 
    background-color: var(--primary-bg); 
    background: var(--primary-bg); 
    color: var(--primary-text);
    font-family: inherit;
    font-size: 0.95em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

select {
     width: 100%;
     cursor: none;
     appearance: none; 
     background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23E0E0E0'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
     background-repeat: no-repeat;
     background-position: right 15px center;
     padding-right: 40px; 
}

input[type="text"]::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--button-primary-focus-shadow); /* Consistent focus shadow */
    background-color: var(--primary-bg);
    background: (var--primary-bg);
}

/* --- Button Styling (Modernized) --- */
button {
    padding: 12px 24px;
    margin-right: 10px;
    cursor: none;
    border: none;
    border-radius: 24px;
    background: var(--button-primary-bg);
    color: var(--button-primary-text);
    font-family: inherit;
    font-weight: 500;
    font-size: 0.95em;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

button:hover {
    background: var(--button-primary-hover-bg);
    transform: translateY(-3px) scale(1.03); 
    box-shadow: 0 6px 12px rgba(0,0,0,0.35);
}

button:active {
    transform: translateY(0px) scale(1); 
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}


button:disabled {
    background: var(--button-disabled-bg);
    color: var(--button-disabled-text);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}


#reset-button {
    background: var(--button-secondary-bg);
    color: var(--button-secondary-text);
    border: 1px solid var(--button-secondary-border);
    box-shadow: none;

    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

#reset-button:hover {
    background: var(--button-secondary-hover-bg);
    border-color: var(--accent-blue);
    color: var(--primary-text);
    transform: translateY(-3px) scale(1.03); 
    box-shadow: 0 4px 8px rgba(255,255,255,0.15); 
}
#reset-button:active {
    transform: translateY(0px);
    box-shadow: none;
}
#reset-button:disabled {
    background: var(--button-secondary-disabled-bg);
    color: var(--button-secondary-disabled-text);
    border-color: var(--button-disabled-bg);
    box-shadow: none;
}

/* --- Results & Status Styling --- */
#status-message {
    color: var(--primary-text);
    min-height: 1.6em;
    font-style: italic;
    font-size: 0.9em;
}

#result-display {
    font-weight: 400;
    font-size: 1em;
    color: var(--primary-text);
}

#state-sequence-display {
    font-family: inherit;
    background-color: var(--primary-bg); /* Match overall page bg */
    padding: 12px 15px;
    border: 1px solid var(--border-light);
    min-height: 50px;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--primary-text);
    border-radius: 6px; /* Slightly rounded */
    margin-top: 5px;
}

.state-step {
    display: inline-block;
    margin: 2px 5px 2px 0;
    padding: 3px 6px;
    border: 1px solid var(--transparent);
    border-radius: 4px; /* Rounded step indicators */
    transition: background-color 0.2s ease, color 0.2s ease;
}

.state-step.highlight {
    background: var(--button-primary-hover-bg);
    color: var(--primary-text);
    border: 1px solid var(--border-medium);
    font-weight: bold;
}

.state-step.error { 
    color: var(--error-text);
    font-weight: bold;
    background-color: var(--error-bg-soft-stronger);
    padding: 3px 6px;
    border-radius: 4px;
}

.error { /* General error message box */
    color: var(--error-text);
    font-weight: bold;
    background-color: var(--error-bg-soft);
    padding: 10px 15px; 
    border-radius: 6px;
    margin-top: 10px;
    border-left: 4px solid var(--error-text); 
}

.hidden {
    display: none;
}

#loading-indicator {
    display: inline-block;
    margin-left: 15px;
    color: var(--accent-blue);
    font-style: italic;
}
#loading-indicator.hidden{
    display: none;
}


/* DFA Visualization */
#dfa-visualization, #pda-visualization-svg { 
    border: 1px solid var(--border-light);
    background-color: var(--primary-bg); 
    display: block;
    margin: auto;
    border-radius: 8px;
}

#dfa-visualization {
    max-width: 850px;
    min-height: 525px; 
}


/* MODIFY DFA SCALE HEREEE */

#dfa-visualization .state-circle.highlight-style {
    fill: var(--highlight-bg);
    stroke: var(--highlight-border);
    stroke-width: 3px; 
    stroke-dasharray: none;
    transform: scale(1.3);
}

#dfa-visualization .state-label.highlight-style {
    fill: var(--highlight-text);
    font-weight: bold;
    transform: scale(1.3);
}

.state-circle {
    stroke: var(--border-medium);
    stroke-width: 1.5px;
    fill: var(--secondary-bg); /* Match container bg */
    cursor: default;
    transition: fill 0.2s ease-in-out, stroke 0.2s ease-in-out, transform 0.1s ease;
}

.state-circle.start-state {
   stroke: var(--accent-green);
   stroke-width: 2.5px;
   fill: var(--accent-green-dark);
}

.state-circle.final-state {
    stroke: var(--header-accent); 
    stroke-width: 2px;
    stroke-dasharray: 4 3; /* Slightly adjusted dasharray */
    fill: var(--accent-purple-dark);
}

.state-circle.start-state.final-state {
     stroke: var(--accent-yellow);
     stroke-width: 2.5px;
     stroke-dasharray: none;
     fill: var(--accent-yellow-dark);
}

.state-circle.trap-state {
    fill: var(--error-fill-dark);
    stroke: var(--error-text);
    stroke-width: 2px;
}

.state-label {
    font-family: 'Google Sans', Arial, sans-serif;
    font-size: 10px;
    font-weight: 500; 
    fill: var(--primary-text);
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    user-select: none;
}
.state-label.final-state-label {
     fill: var(--accent-purple-light-text);
     font-weight: bold;
}
 .state-label.trap-state-label {
     fill: var(--error-text-light);
     font-weight: bold;
}

.transition-path { 
    stroke: var(--border-dark); 
    stroke: var(--border-medium); 
    stroke-width: 1.5px;
    fill: none;
}

.transition-label { 
    font-family: 'Google Sans', Arial, sans-serif;
    font-size: 9px;
    fill: var(--text-muted);
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    user-select: none;

}

#arrowhead { 
    fill: var(--border-medium); 
}


/* PDA Visualization Specifics */
.pda-layout-container {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
#pda-visualization-svg {

    flex-grow: 2.5;  
    flex-shrink: 1;  
    flex-basis: 0;    
    max-width: 1000px;
    width: auto;     
    min-height: 630px;
    border: 1px solid var(--border-light);
    background-color: var(--primary-bg);
    display: block;   
    border-radius: 8px;
}

#pda-stack-visualization {

    flex-grow: 1;   
    flex-shrink: 1;
    flex-basis: 0;
    max-width: 800px; 
    min-height: 600px;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-light);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}


#pda-stack-visualization h3 {
    margin-top: 0;
    color: var(--header-accent);
    text-align: center;
    border-bottom: 1px dashed var(--border-light);
    padding-bottom: 0.3em;
    margin-bottom: 0.8em; 
    font-size: 1.1em;
}

.stack-display-area {
    flex-grow: 1;
    background-color: var(--primary-bg); 
    padding: 10px 8px;
    border: 1px solid var(--border-light);
    border-radius: 6px; 
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    overflow-y: auto;
    min-height: 250px;
}

.stack-item { 
    background: var(--button-primary-hover-bg); 
    color: var(--primary-text); 
    padding: 8px 12px; 
    margin-top: 5px; 
    border-radius: 6px; 
    width: 90%;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 1px 3px var(--shadow-soft);
    transition: background-color 0.3s, transform 0.2s;
}

.stack-item.stack-top {
    background: var(--button-primary-bg); 
    color: var(--primary-text); 
    transform: scale(1.05);
    font-weight: bold;
}

.stack-item.empty {
    background-color: var(--transparent);
    color: var(--text-muted);
    font-style: italic;
    box-shadow: none;
    border: 1px dashed var(--border-medium);
}

#pda-current-config-display {
    margin-top: 15px;
    padding: 12px 15px;
    background-color: var(--secondary-bg); 
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-family: 'Google Sans', Arial, sans-serif; 
    min-height: 1.8em;
    text-align: center;
    font-size: 0.95em;
}

/* PDA Node Styling */
#pda-visualization-svg .pda-node {
    stroke-width: 1.5px;
    cursor: default;
    transition: fill 0.2s ease-in-out, stroke 0.2s ease-in-out, transform 0.1s ease;
}

#pda-visualization-svg .pda-node-label {
    font-family: 'Google Sans', Arial, sans-serif;
    font-size: 10px;
    fill: var(--primary-text);
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    user-select: none;
    font-weight: 500;
}

#pda-visualization-svg .pda-start-node {
    fill: var(--pda-start-bg);
    stroke: var(--pda-start-stroke);
    stroke-width: 2.5px;
}
#pda-visualization-svg .pda-start-node-label {
    fill: var(--pda-start-text);
    font-weight: bold;
}

#pda-visualization-svg .pda-accept-node {
    fill: var(--pda-accept-bg);
    stroke-dasharray: 4 3;
    stroke: var(--pda-accept-stroke);
    stroke-width: 2px; 
}
#pda-visualization-svg .pda-accept-node-label {
    fill: var(--pda-accept-text);
    font-weight: bold;
}

#pda-visualization-svg .pda-reject-node {
    fill: var(--pda-reject-bg);
    stroke: var(--pda-reject-stroke);
    stroke-width: 2px;
}
#pda-visualization-svg .pda-reject-node-label {
    fill: var(--pda-reject-text);
    font-weight: bold;
}

#pda-visualization-svg .pda-processing-node {
    fill: var(--pda-processing-bg);
    stroke: var(--pda-processing-stroke);
}
#pda-visualization-svg .pda-processing-node-label {
    fill: var(--primary-text); 
}

#pda-visualization-svg .pda-node.highlight {
    fill: var(--pda-highlight-bg) !important;
    stroke: var(--pda-highlight-stroke) !important;
    stroke-width: 3px !important;
    
}

#pda-visualization-svg .pda-node.highlight + .pda-node-label,
#pda-visualization-svg g:has(> .pda-node.highlight) .pda-node-label {
    fill: var(--pda-highlight-text) !important;
    font-weight: bold;
}

/* PDA Transition Paths and Labels */
#pda-visualization-svg .transition-path {
    stroke: var(--pda-transition-path-stroke);
    stroke-width: 1.5px;
    fill: none;
}

#pda-visualization-svg .transition-label {
    font-family: 'Google Sans', Arial, sans-serif;
    font-size: 9px;
    fill: var(--pda-transition-path-label);
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    user-select: none;
}

#pda-visualization-svg #pda-arrowhead {
    fill: var(--pda-arrowhead-fill);
}


/* PDA Node Styling */
#pda-visualization-svg .pda-node { 
    stroke-width: 1.5px;
    cursor: none;
    transition: fill 0.2s ease-in-out, stroke 0.2s ease-in-out, transform 0.1s ease;
}

/* Style for diamond-shaped READ nodes */
#pda-visualization-svg .pda-read-node {
    fill: var(--pda-processing-bg); 
    stroke: var(--pda-processing-stroke);
}
#pda-visualization-svg .pda-read-node.highlight { 
    fill: var(--pda-highlight-bg) !important;
    stroke: var(--pda-highlight-stroke) !important;
}

/* Style for diamond-shaped POP nodes */
#pda-visualization-svg .pda-pop-node {
    fill: var(--pda-processing-bg); 
    stroke: var(--pda-processing-stroke);
}
#pda-visualization-svg .pda-pop-node.highlight { 
    fill: var(--pda-highlight-bg) !important;
    stroke: var(--pda-highlight-stroke) !important;
}

/* Style for PUSH specific rectangles */
#pda-visualization-svg .pda-push-node {
    fill: var(--secondary-bg); 
    stroke: var(--border-medium);
}
#pda-visualization-svg .pda-push-node.highlight {
    fill: var(--pda-highlight-bg) !important;
    stroke: var(--pda-highlight-stroke) !important;
}


#pda-visualization-svg .pda-node-label {
    font-family: 'Google Sans', Arial, sans-serif;
    font-size: 10px;
    fill: var(--primary-text);
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    user-select: none;
    font-weight: 500;
}


/* --- CFG Specific Styling --- */
#cfg-rules-display { 
    font-family: 'Google Sans', Arial, sans-serif; 
    background-color: var(--primary-bg); 
    padding: 12px 15px;
    border: 1px solid var(--border-light);
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--primary-text);
    border-radius: 6px;
    margin-top: 5px;
    line-height: 1.5; 
}

#cfg-details-container {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.cfg-rules-section, .cfg-derivation-section {
    flex: 1;
    background-color: var(--secondary-bg); 
    border: 1px solid var(--border-light);
    padding: 15px;
    border-radius: 8px; 
}

.cfg-rules-section h3, .cfg-derivation-section h3 { 
    margin-top: 0;
    color: var(--header-accent);
    border-bottom: 1px dashed var(--border-light);
    padding-bottom: 0.3em;
    margin-bottom: 0.8em; /* More space */
}

.sequence-display-area, .current-string-display { 
    font-family: 'Google Sans', Arial, sans-serif; /* Monospace for derivations */
    background-color: var(--primary-bg);
    padding: 10px 15px;
    border: 1px solid var(--border-light);
    min-height: 40px;
    max-height: 150px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--accent-yellow);
    border-radius: 6px;
    margin-top: 5px;
    margin-bottom: 10px;
}

#cfg-current-string { 
    font-weight: bold;
    font-size: 1.1em;
    text-align: center;
    padding: 12px 15px; /* More padding for emphasis */
}

.derivation-step { 
    display: block;
    margin-bottom: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
    padding: 2px 0;
}

.derivation-step .rule-applied {
    font-style: italic;
    color: var(--accent-blue);
    margin-left: 10px;
    font-size: 0.9em;
}

.derivation-step.highlight, #cfg-current-string .highlight {
    background: var(--button-primary-bg);
    color: var(--highlight-text) !important; 
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

.status-message-area, .result-display-area { 
    margin-top: 10px;
    color: var(--primary-text);
    font-size: 0.9em;
}
#cfg-result-display { 
    font-weight: bold;
}

.non-terminal { 
    color: var(--header-accent); 
    font-style: italic;
    font-weight: 500;
}
.terminal { 
    color: var(--primary-text); 
    font-weight: bold;
}




.view-mode-controls {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.view-mode-controls > label:first-of-type { 
    margin-right: 5px; 
    font-size: 0.9em;
    color: var(--primary-text);
    font-weight: 500; 
}

/* Hide the default radio button */
.view-mode-controls input[type="radio"] {
    opacity: 0; 
    position: absolute; 
    width: 0;
    height: 0;
}

/* Style for the labels associated with radio buttons */
.view-mode-controls input[type="radio"] + label {
    position: relative; 
    padding-left: 30px; 
    cursor: none;
    font-weight: normal;
    color: var(--primary-text);
    font-size: 0.9em;
    transition: color 0.2s ease-in-out;
    margin-right: 15px; /* Space between radio options */
}

/* Create the custom radio button circle */
.view-mode-controls input[type="radio"] + label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%); 
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-medium);
    border-radius: 50%; 
    background-color: var(--primary-bg); 
    transition: border-color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

/* Create the inner dot for the selected state */
.view-mode-controls input[type="radio"] + label::after {
    content: '';
    position: absolute;
    left: 5px; 
    top: 50%;
    transform: translateY(-50%) scale(0); 
    width: 10px; /* Smaller dot */
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent-blue); 
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); /* Smooth spring-like animation */
}

/* Style for when the radio button is checked */
.view-mode-controls input[type="radio"]:checked + label::before {
    border-color: var(--accent-blue); 
}

.view-mode-controls input[type="radio"]:checked + label::after {
    transform: translateY(-50%) scale(1); 
}

/* Hover effect */
.view-mode-controls input[type="radio"]:not(:checked) + label:hover::before {
    border-color: var(--accent-blue-darker); 
}
.view-mode-controls input[type="radio"] + label:hover {
    color: var(--accent-blue); 
}

/* Focus effect (for accessibility) */
.view-mode-controls input[type="radio"]:focus + label::before {
    box-shadow: 0 0 0 3px var(--button-primary-focus-shadow); 
}

/* Optional: Style the label text when checked */
.view-mode-controls input[type="radio"]:checked + label {
    color: var(--accent-blue);
    font-weight: 500;
}
