:root {
    --primary: #39ff14;
    --bg-dark: #000000;
    --card-bg: rgba(20, 20, 20, 0.9);
    --text-light: #ffffff;
    --text-dim: #a0a0a0;
    --border: rgba(57, 255, 20, 0.2);
}

body.app-body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    margin: 0;
    min-height: 100vh;
}

/* Shared Header Styling */
.glass-nav {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 0;
}

.nav-container {
    width: 80%;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.logo span { color: var(--primary); }

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary-glowing {
    background: var(--primary);
    color: #000;
    border: none;
    font-weight: 800;
    border-radius: 8px;
    box-shadow: 0 0 20px var(--primary-glow);
    transition: all 0.3s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary-glowing:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px var(--primary-glow);
}

.btn-nav-web {
    background: rgba(57, 255, 20, 0.1);
    color: var(--primary) !important;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.app-container {
    width: 80%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Custom Radio Switches */
.radio-group input[type="radio"] {
    display: none;
}

.radio-group label {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    color: var(--text-dim);
}

.radio-group input[type="radio"]:checked + span,
.radio-group label:has(input[type="radio"]:checked) {
    background: rgba(57, 255, 20, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

/* For the Active Tool radios in sub-groups */
.control-sub-group .radio-group label {
    display: block;
    text-align: center;
    margin-top: 10px;
}

.tool-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.logo-small {
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.logo-small span { color: var(--primary); }

.top-toolbar {
    display: flex;
    gap: 1.5rem;
    background: rgba(57, 255, 20, 0.03);
    padding: 1.2rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.btn-primary { background: var(--primary); color: #000; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; transition: all 0.2s; font-weight: 700; }
.btn-secondary { background: rgba(255, 255, 255, 0.05); color: #fff; border: 1px solid rgba(255, 255, 255, 0.1); padding: 10px 20px; border-radius: 8px; cursor: pointer; transition: all 0.2s; font-weight: 500; }
.btn-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); padding: 10px 20px; border-radius: 8px; cursor: pointer; transition: all 0.2s; font-weight: 500; }
.btn-success { background: rgba(57, 255, 20, 0.1); color: var(--primary); border: 1px solid var(--border); padding: 10px 20px; border-radius: 8px; cursor: pointer; transition: all 0.2s; font-weight: 500; }

.btn-primary:hover {
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.6);
    transform: translateY(-1px);
}

.btn-secondary:hover, .btn-danger:hover, .btn-success:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
}

.hidden { display: none !important; }

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: #0f172a;
    padding: 2rem;
    border-radius: 20px;
    width: 90%; max-width: 500px;
}

.workspace-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 20px;
}

.workspace-section {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.workspace-section.active {
    background-color: #000000;
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(57, 255, 20, 0.2);
    cursor: default;
}

.workspace-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.workspace-section.active .workspace-badge {
    opacity: 1;
    transform: translateY(0);
}

.control-sub-group {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.control-sub-group:hover {
    background: rgba(255, 255, 255, 0.04);
}

.control-sub-group.active-tool {
    border-color: var(--primary);
    background: rgba(57, 255, 20, 0.03);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.1);
}

.tool-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: #000;
    font-size: 9px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.control-sub-group.active-tool .tool-badge {
    opacity: 1;
    transform: translateY(0);
}

.control-sub-group h3 {
    margin: 0 0 15px 0;
    font-size: 0.85rem;
    color: var(--primary);
    opacity: 0.8;
}

#bg-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, #0a0a0a 0%, #000000 100%);
}

.stack-controls {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
}

.tool-tip {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 1rem;
    font-style: italic;
}
