        .container {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        .controls {
            width: 100%;
            background: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            height: fit-content;
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
        }
        .controls button {
            width: 120px;
            height: 60px;
        }
        .die-container {
            flex: 1;
            background: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            text-align: center;
        }
        .canvas-container {
            position: relative;
            display: inline-block;
            padding-bottom: 30px;
        }
        .zoom-controls {
            display: flex;
            flex-direction: row;
            gap: 5px;
            justify-content: center;
            align-items: center;
            margin: 0 auto 10px auto;
        }
        .zoom-btn {
            width: 40px;
            height: 40px;
            padding: 0;
            margin: 0;
            flex: 0 0 40px;
            font-size: 18px;
            font-weight: bold;
            border-radius: 4px;
            background-color: rgba(255, 255, 255, 0.9);
            color: #007bff;
            border: 2px solid #007bff;
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
            box-sizing: border-box;
        }
        .zoom-btn:hover {
            background-color: #007bff;
            color: white;
            transform: scale(1.05);
        }
        .zoom-btn:active {
            transform: scale(0.95);
        }
        .height-label {
            position: absolute;
            transform: translateY(-50%) rotate(90deg);
            font-weight: bold;
            color: #333;
            white-space: nowrap;
            cursor: pointer;
            padding: 3px 6px;
            border-radius: 4px;
            transition: background-color 0.2s;
            background-color: #fff;
            border: 1px solid #ced4da;
        }
        .height-label:hover {
            background-color: #e3f2fd;
            border-color: #007bff;
        }
        .height-label[contenteditable="true"] {
            outline: 2px solid #007bff;
            background-color: #fff;
            border-color: #007bff;
        }
        .width-label {
            position: absolute;
            transform: translateX(-50%);
            font-weight: bold;
            color: #333;
            white-space: nowrap;
            cursor: pointer;
            padding: 3px 6px;
            border-radius: 4px;
            transition: background-color 0.2s;
            background-color: #fff;
            border: 1px solid #ced4da;
        }
        .width-label:hover {
            background-color: #e3f2fd;
            border-color: #007bff;
        }
        .width-label[contenteditable="true"] {
            outline: 2px solid #007bff;
            background-color: #fff;
            border-color: #007bff;
        }
        .die-stats {
            margin-bottom: 20px;
            text-align: center;
            background-color: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
            border: 1px solid #dee2e6;
        }
        .stats-table {
            width: 100%;
            border-collapse: collapse;
        }
        .stats-table td {
            padding: 8px;
            vertical-align: top;
        }
        .stats-column {
            width: 50%;
        }
        .stat-row {
            margin-bottom: 8px;
            font-size: 18px;
            text-align: left;
        }
        .stat-label {
            font-weight: bold;
            color: #495057;
        }
        .stat-value {
            color: #007bff;
            font-weight: bold;
        }
        #maxFreqNumber {
            cursor: pointer;
            padding: 3px 6px;
            border-radius: 4px;
            transition: background-color 0.2s;
            background-color: #fff;
            border: 1px solid #ced4da;
            display: inline-block;
            min-width: 40px;
        }
        #maxFreqNumber:hover {
            background-color: #e3f2fd;
            border-color: #007bff;
        }
        #maxFreqNumber[contenteditable="true"] {
            outline: 2px solid #007bff;
            background-color: #fff;
            border-color: #007bff;
        }
        .form-group {
            margin-bottom: 15px;
        }
        label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }
        input, textarea, button {
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-sizing: border-box;
        }
        button {
            background-color: #007bff;
            color: white;
            border: none;
            cursor: pointer;
            margin-bottom: 10px;
        }
        button:hover {
            background-color: #0056b3;
        }
        button:disabled {
            background-color: #6c757d;
            cursor: not-allowed;
            opacity: 0.6;
        }
        .action-buttons {
            display: flex;
            gap: 10px;
            margin-bottom: 10px;
        }
        .action-buttons button {
            flex: 1;
        }
        .save-load-buttons {
            display: flex;
            gap: 10px;
        }
        .button-grid {
            display: grid;
            grid-template-columns: repeat(2, 120px);
            gap: 10px;
        }
        #canvas {
            max-width: 100%;
            cursor: crosshair;
        }
        #canvas.dragging {
            cursor: move;
        }
        .die-dimensions {
            margin-bottom: 20px;
        }
        .dimension-control {
            display: inline-block;
            margin: 0 10px;
        }
        .dimension-control label {
            display: inline;
            margin-right: 5px;
        }
        .dimension-control input {
            width: 80px;
            display: inline;
        }
        #heightLabel {
            font-weight: bold;
            color: #333;
        }
        textarea {
            resize: vertical;
            height: 60px;
        }
        .checkbox-container {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .checkbox-container input[type="checkbox"] {
            width: auto;
        }
        .die-info-controls {
            background-color: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
            border: 1px solid #dee2e6;
            flex: 1;
        }
        .rectangle-controls {
            background-color: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
            border: 1px solid #dee2e6;
        }
        .die-info-controls h3,
        .rectangle-controls h3 {
            color: #007bff;
            font-size: 20px;
            font-weight: bold;
            margin-top: 0;
            margin-bottom: 15px;
        }
        .die-title {
            text-align: center;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px solid #dee2e6;
        }
        .die-title h2 {
            margin: 0 0 5px 0;
            color: #333;
            font-size: 24px;
            cursor: pointer;
            padding: 5px;
            border-radius: 4px;
            transition: background-color 0.2s;
        }
        .die-title h2:hover {
            background-color: #f0f0f0;
        }
        .die-title h2[contenteditable="true"] {
            outline: 2px solid #007bff;
            background-color: #fff;
        }
        .die-title p {
            margin: 0;
            color: #666;
            font-style: italic;
            font-size: 14px;
            cursor: pointer;
            padding: 5px;
            border-radius: 4px;
            transition: background-color 0.2s;
        }
        .die-title p:hover {
            background-color: #f0f0f0;
        }
        .die-title p[contenteditable="true"] {
            outline: 2px solid #007bff;
            background-color: #fff;
        }
        .unit-buttons-container {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
        }
        .unit-button {
            flex: 0 0 auto;
            width: 120px;
            height: 60px;
            padding: 5px;
            font-size: 13px;
            line-height: 1.2;
            white-space: pre-line;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        .unit-button:hover {
            background-color: #fec400;
        }
        .unit-button .symbol {
            font-size: 24px;
            line-height: 1;
            margin-bottom: 3px;
        }
        .unit-button .ddr-symbol {
            font-size: 14px;
            font-weight: bold;
            margin-bottom: 3px;
        }
