* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .navbar {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 30px;
            background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
            padding: 18px 0 14px 0;
            border-radius: 0 0 18px 18px;
            box-shadow: 0 4px 16px rgba(0,0,0,0.10);
            margin-bottom: 28px;
        }
        .navbar a {
            color: #fff;
            text-decoration: none;
            font-weight: 600;
            font-size: 1.1rem;
            padding: 8px 18px;
            border-radius: 6px;
            transition: background 0.2s, color 0.2s;
        }

        .navbar a:hover,
        .navbar a.active {
            background: rgba(255,255,255,0.18);
            color: #ffd700;
        }
        html {
            overflow-y: scroll; /* Always show vertical scrollbar */
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            color: #333;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
        }

        header {
            text-align: center;
            margin-bottom: 30px;
            color: white;
        }

        h1 {
            font-size: 2.5rem;
            margin-bottom: 10px;
            text-shadow: 0 2px 4px rgba(0,0,0,0.3);
        }

        .subtitle {
            font-size: 1.2rem;
            opacity: 0.9;
            margin-bottom: 20px;
        }

        .theory-box {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 25px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        }

        .main-content {
            display: grid;
            grid-template-columns: 1fr 350px;
            gap: 25px;
            align-items: start;
        }

        .canvas-container {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        }

        .controls {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        }

        canvas {
            border: 2px solid #e0e0e0;
            border-radius: 10px;
            cursor: crosshair;
            background: #fafafa;
        }

        .shape-selector {
            margin: 15px 0;
        }

        .shape-buttons {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            margin: 10px 0;
        }

        .shape-btn {
            padding: 10px;
            border: 2px solid #ddd;
            border-radius: 8px;
            background: white;
            cursor: pointer;
            text-align: center;
            transition: all 0.3s ease;
            font-size: 12px;
        }

        .shape-btn:hover {
            border-color: #007bff;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }

        .mode-buttons {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        button {
            padding: 12px 20px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
            font-size: 14px;
        }

        .mode-btn {
            background: #6c757d;
            color: white;
            flex: 1;
        }

        .mode-btn.active {
            background: #007bff;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,123,255,0.3);
        }

        .action-btn {
            background: #28a745;
            color: white;
            width: 100%;
            margin: 10px 0;
        }

        .clear-btn {
            background: #dc3545;
        }

        button:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        }
        .shape-btn.selected {
            border-color: #007bff;
            box-shadow: 0 4px 8px rgba(0,123,255,0.15);
            background: #eaf3ff;
        }

        .info-section {
            margin: 20px 0;
            padding: 25px;
            background: #f8f9fa;
            border-radius: 15px;
            border-left: 4px solid #007bff;
        }

        .legend {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-top: 20px;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .legend-color {
            width: 20px;
            height: 20px;
            border-radius: 4px;
            border: 2px solid #333;
        }

        .alpha-control {
            margin: 20px 0;
        }

        .alpha-control input {
            width: 100%;
            margin: 10px 0;
        }

        .alpha-value {
            text-align: center;
            font-weight: bold;
            color: #007bff;
            font-size: 1.1rem;
        }

        .formula {
            background: #f1f3f4;
            padding: 15px;
            border-radius: 8px;
            font-family: 'Courier New', monospace;
            text-align: center;
            margin: 15px 0;
        }

        .position-controls {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin: 10px 0;
        }

        .position-input {
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            text-align: center;
        }

        .github-link {
            position: absolute;
            top: 18px;
            right: 32px;
            z-index: 10;
        }
        .github-link a {
            display: flex;
            align-items: center;
            text-decoration: none;
            font-weight: bold;
            color: #222;
            background: #f5f5f5;
            border-radius: 20px;
            padding: 6px 14px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
            transition: background 0.2s;
        }
        .github-link a:hover {
            background: #e0e0e0;
        }
        .github-link svg {
            margin-right: 8px;
            height: 20px;
            width: 20px;
            fill: #222;
        }
        @media (max-width: 600px) {
            .github-link {
                position: static;
                margin: 12px 0 0 0;
                text-align: right;
            }
        }

        @media (max-width: 1200px) {
            .main-content {
                grid-template-columns: 1fr;
            }
            
            .controls {
                order: -1;
            }
        }

        @media (max-width: 768px) {
            .container {
                padding: 10px;
            }
            
            h1 {
                font-size: 2rem;
            }
            
            canvas {
                width: 100%;
                height: 400px;
            }
        }