<style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
            color: #333;
        }

        .container {
            max-width: 1800px;
            margin: 0 auto;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        }

        h1 {
            text-align: center;
            color: #2c3e50;
            margin-bottom: 30px;
            font-size: 2.5em;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
        }

        .content {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 40px;
            margin-top: 30px;
        }

        .left-panel {
            background: #f8f9fa;
            padding: 25px;
            border-radius: 15px;
            border: 2px solid #e9ecef;
        }

        .right-panel {
            background: #f8f9fa;
            padding: 25px;
            border-radius: 15px;
            border: 2px solid #e9ecef;
        }

        .input-group {
            margin-bottom: 20px;
        }

        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #2c3e50;
        }

        input[type="number"], select {
            width: 100%;
            padding: 12px;
            border: 2px solid #ddd;
            border-radius: 8px;
            font-size: 16px;
            transition: all 0.3s ease;
        }

        input[type="number"]:focus, select:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
        }

        .geometry-selector {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-bottom: 25px;
        }

        .geometry-option {
            padding: 20px;
            border: 3px solid #ddd;
            border-radius: 10px;
            cursor: pointer;
            text-align: center;
            transition: all 0.3s ease;
            background: white;
        }

        .geometry-option:hover {
            border-color: #667eea;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
        }

        .geometry-option.active {
            border-color: #667eea;
            background: linear-gradient(135deg, #667eea10 0%, #764ba220 100%);
        }

        .geometry-option input[type="radio"] {
            display: none;
        }

        .geometry-icon {
            font-size: 48px;
            margin-bottom: 10px;
        }

        .calculate-btn {
            width: 100%;
            padding: 15px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 18px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-top: 20px;
        }

        .calculate-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
        }

        .results {
            background: #e8f5e8;
            padding: 20px;
            border-radius: 10px;
            margin-top: 20px;
            border-left: 5px solid #28a745;
        }

        .results h3 {
            color: #155724;
            margin-bottom: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .results-container {
            background: white;
            border-radius: 5px;
            overflow: hidden;
        }

        .results-content {
            max-height: 300px;
            overflow-y: auto;
            padding: 15px;
            font-family: monospace;
            font-size: 11px;
            line-height: 1.4;
            white-space: pre-wrap;
        }

        .results-content::-webkit-scrollbar {
            width: 10px;
        }

        .results-content::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 5px;
        }

        .results-content::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 5px;
        }

        .nav-buttons {
            display: flex;
            gap: 10px;
            padding: 10px;
            background: #f8f9fa;
            border-top: 1px solid #ddd;
            justify-content: center;
        }

        .nav-btn {
            padding: 8px 20px;
            background: #667eea;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        .nav-btn:hover {
            background: #5568d3;
        }

        .action-buttons {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .action-btn {
            padding: 8px 15px;
            background: #17a2b8;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.3s ease;
        }

        .action-btn:hover {
            background: #138496;
            transform: translateY(-1px);
        }

        .formula {
            background: #f0f8ff;
            padding: 15px;
            border-radius: 8px;
            margin: 15px 0;
            border-left: 4px solid #4682b4;
            font-family: monospace;
            font-size: 12px;
        }

        .warning-box {
            background: #fff3cd;
            border-left: 5px solid #ffc107;
            padding: 15px;
            border-radius: 8px;
            margin: 15px 0;
            color: #856404;
        }

        .info-box {
            background: #d1ecf1;
            border-left: 5px solid #17a2b8;
            padding: 15px;
            border-radius: 8px;
            margin: 15px 0;
            color: #0c5460;
        }

        .error {
            background: #f8d7da;
            border-left: 5px solid #dc3545;
            padding: 15px;
            border-radius: 8px;
            margin: 10px 0;
            color: #721c24;
        }

        canvas {
            border: 1px solid #ddd;
            border-radius: 5px;
            background: white;
            max-width: 100%;
            margin-top: 20px;
        }

        .critical-indicator {
            width: 100%;
            height: 60px;
            border-radius: 8px;
            margin: 20px 0;
            position: relative;
            background: linear-gradient(to right, #28a745 0%, #ffc107 50%, #dc3545 100%);
        }

        .indicator-marker {
            position: absolute;
            width: 4px;
            height: 100%;
            background: #000;
            top: 0;
        }

        .indicator-label {
            position: absolute;
            top: -25px;
            font-size: 12px;
            font-weight: bold;
            transform: translateX(-50%);
        }

        @media (max-width: 1200px) {
            .content {
                grid-template-columns: 1fr;
            }
        }
    </style>