/*uhh 10000 variables in css lol */
:root {
            --bg-app: #0f172a;
            --bg-panel: #1e293b;
            --bg-input: #0f172a;
            --bg-hover: #334155;
            --text-primary: #f8fafc;
            --text-secondary: #94a3b8;
            --text-muted: #64748b;
            --accent-primary: #8b5cf6;
            --accent-hover: #7c3aed;
            --accent-glow: rgba(139, 92, 246, 0.3);
            --accent-secondary: #06b6d4;
            --accent-tertiary: #f43f5e;
            --accent-success: #10b981;
            --accent-warning: #f59e0b;
            --border-color: #334155;
            --border-light: #475569;
            --sidebar-width: 380px;
            --header-height: 60px;
            --radius-sm: 4px;
            --radius-md: 8px;
            --radius-lg: 12px;
            --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
        }
        *{
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            scrollbar-width: thin;
            scrollbar-color: var(--border-light) var(--bg-panel);
        }
        /* adding scrollbar css yay*/
        ::-webkit-scrollbar{
            width: 8px;
            height: 8px;
        }
        ::-webkit-scrollbar-track{
            background: var(--bg-panel);
        }
        ::-webkit-scrollbar-thumb{
            background: var(--border-light);
            border-radius: 4px;
        }
        ::-webkit-scrollbar-thumb:hover{
            background: var(--text-muted);
        }
        body{
            background-color: var(--bg-app);
            color: var(--text-primary);
            font-family: var(--font-main);
            height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            font-size: 14px;
            line-height: 1.5;
        }
        /*into actuall app now*/
        .app-header{
            height: var(--header-height);
            background-color: var(--bg-panel);
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            z-index: 50;
        }
        .header-left{
            display: flex;
            align-items: center;
            gap: 20px;
        }
        .app-logo{
            font-size: 1.25rem;
            font-weight: 800;
            background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            letter-spacing: -0.5px;
        }
        .header-right{
            display: flex;
            gap: 10px;
        }
        .icon-btn{
            background: transparent;
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            color: var(--text-secondary);
            width: 35px;
            height: 35px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
        }
        .icon-btn:hover{
            background: var(--bg-hover);
            color: var(--text-primary);
            border-color: var(--text-muted); /* lol all styles using variables */
        }
        .main-container{
            display: flex;
            flex: 1;
            overflow: hidden;
        }
        .sidebar{
            width: var(--sidebar-width);
            background-color:var(--bg-panel);
            border-right:1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            z-index: 40;
        }
        .sidebar-tabs{
            display: flex;
            border-bottom: 1px solid var(--border-color);
            background: var(--bg-app);
        }
        .tab-btn{
            flex: 1;
            padding: 12px;
            background: transparent;
            border: none;
            color: var(--text-secondary);
            font-weight: 600;
            cursor: pointer;
            border-bottom: 2px solis transparent;
            transition: all 0.2s;
            font-size: 0.899999rem;
        }
        .tab-btn:hover{
            color: var(--text-primary);
            background: var(--bg-hover);
        }
        .tab-btn.active{
            color: var(--accent-primary);
            border-bottom-color:var(--accent-primary);
            background: rgba(139, 92, 246, 0.05);
        }
        .sidebar-content{
            flex: 1;
            overflow-y: auto;
            padding: 20px;
        }
        .panel-section{
            margin-bottom: 24px;
            animation: fadeIn 0.3s ease-out;
        }
        .section-title{
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--text-muted);
            margin-bottom: 12px;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        /* iam tired man imma do some more minutes and zzzzzzzzzz */
        .section-title::after{
            content: '';
            flex: 1;
            height: 1px;
            background: var(--border-color);
        }
        .input-group{
            display: block;
            margin-bottom: 6px;
            color: var(--text-secondary);
            font-size: 0.89999999rem;
        }
        /* designing is toughhhhhh */
        .input-label{
            display: block;
            margin-bottom: 6px;
            color: var(--text-secondary);
            font-size: 0.8999rem;
        }
        .poly-input-container{
            position: relative;
        }
        .poly-input{
            width: 100%;
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            padding: 12px;
            color: var(--text-primary);
            font-family: var(--font-mono);
            font-size: 1rem;
            transition: all 0.2s;
        }
        .poly-input:focus{
            outline: none;
            border-color: var(--accent-primary);
            box-shadow: 0 0 3px var(--accent-glow);/* not a fan though*/
        }
        .input-hint{
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 4px;
        }
        /* good night*//*,*/ /*back again*/
        .action-btn{
            width: 100%;
            padding: 12px;
            color: white;
            background: var(--accent-primary);
            border: none;
            border-radius: var(--radius-md);
            cursor: pointer;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            font-size: 0.945rem;
            gap: 8px;
        }
        .action-btn:hover{
            background: var(--accent-hover);
            box-shadow: 0 4px 11px var(--accent-glow);
        }
        .action-btn:active{
            transform: translateY(0);
        }
        .result-card{
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            padding: 16px;
            margin-bottom: 12px;
        }
        .card-header{
            display: flex;
            align-items: center;
            margin-bottom: 10px;
        }
        .card-title{
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }
        .card-title{
            font-weight: 600;
            color: var(--text-primary);
            font-size: 0.95rem;
        }
        .math-display{
            font-family: var(--font-mono);
            font-size: 1.1rem;
            color: var(--accent-secondary);
            word-break: break-all;
            line-height: 1.5888;
        }
        .root-list{
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .root-item{
            display: flex;
            justify-content: space-between;
            padding: 8px;
            border-radius: var(--radius-sm);
            background: rgba(255, 255, 255, 0.03);
            border-radius: var(--radius-sm);
            font-family: var(--font-mono);
            font-size: 0.8999rem;
        }
        .tag{
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
        }
        .tag-real{
            background: rgba(16, 185, 129, 0.2);
            color: var(--accent-success);
        }
        .tag-complex{
            background: rgba(244, 63, 94, 0.2);
            color: var(--accent-tertiary);
        }
        .canvas-wrapper{
            flex: 1;
            position: relative;
            background-color: var(--bg-app);
            overflow: hidden;
            cursor: crosshair;
        }
        canvas{
            display: block;
            width:100%;
            height: 100%;
        }
        .canvas-controls{
            position: absolute;
            bottom: 20px;
            right: 20px;
            display: flex;
            gap: 8px;
            background: var(--bg-panel);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 8px;
        }
        .canvas-overlay{
            position: absolute;
            top: 20px;
            left: 20px;
            background: rgba(15, 23, 42, 0.9);
            backdrop-filter: blur(8px);
            padding: 12px;
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            min-width: 200px;
            pointer-events: none;
        }
        .overlay-row{
            display: flex;
            justify-content: space-between;
            margin-bottom: 4px;
            font-size: 0.85rem;
        }
        .overlay-label{
            color: var(--text-muted);
        }
        .overlay-value{
            color: var(--accent-secondary);
            font-family: var(--font-mono);
        }
        @keyframes fadeIn{
            from{
                opacity: 0;
                transform: translateY(10px);
            }
            to{
                opacity: 1;
                transform: translateY(0);
            }
        }
        .hidden{
            display: none;
        }
        .text-center{
            text-align: center;
        }
        .mt-2{
            margin-top: 8px;
        }
        .mb-2{
            margin-bottom: 8px;
        }
        .step-item{
            color: var(--text-secondary);
            margin-bottom: 8px;
            font-size: 0.89rem;
        }
        .step-math{
            color:var(--text-primary);
            font-family: var(--font-mono);
            background: rgba(0, 0, 0, 0.2);
            padding: 2px 4px;
            border-radius: 3px;
        }