body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    overflow: auto;
}

.page-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    overflow: auto;
}

.control-bar {
    height: 40px;
    width: 100%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    border-bottom: 1px solid #ccc;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.unit-selector {
    display: flex;
    align-items: center;
    gap: 20px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 5px;
}

.zoom-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.zoom-control button {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    cursor: pointer;
}

.zoom-label {
    margin-right: 10px;
}

#zoom-level {
    width: 20px;
    text-align: center;
}

.rulers-container {
    position: relative;
    padding-top: 50px;
    padding-left: 50px;
    box-sizing: border-box;
    margin-top: 40px;
    width: 100%;
    height: 100%;
    min-width: 2000px;
    min-height: 2000px;
    overflow: auto;
}

.horizontal-ruler {
    position: absolute;
    top: 0;
    left: 80px;/* was 50  */
    height: 50px;
    width: calc(100% - 50px);
    background-color: #f0f0f0;
    border-bottom: 1px solid #000;
    overflow: visible;
}

.vertical-ruler {
    position: absolute;
    top: 80px; /* was 50  */
    left: 0;
    width: 50px;
    height: calc(100% - 50px);
    background-color: #f0f0f0;
    border-right: 1px solid #000;
    overflow: visible;
}

.tick {
    position: absolute;
    background-color: #000;
}

.tick-label {
    position: absolute;
    font-size: 20px;/* was 10  */
    color: #000;
    text-align: center;
    min-width: 28px;
    background-color: rgba(240, 240, 240, 0.8);
    border-radius: 2px;
    font-weight: bold;
}

.horizontal-ruler .tick-label {
    text-align: center;
    transform: translateX(-50%);
}

.vertical-ruler .tick-label {
    text-align: center;
    transform: translateY(-50%);
}

.tick-label.mm {
    font-size: 16px;/* was 8 */
    font-weight: normal;
    min-width: 22px;
    color: #444;
}

.content-area {
    width: calc(100% - 60px);
    height: calc(100% - 60px);
    background-color: white;
    margin-top: 50px;
    margin-left: 50px;
    background-image: 
        linear-gradient(rgba(200, 200, 200, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200, 200, 200, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
}


/* Border Width Control Styling */
.border-width-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background-color: #e8f4f8;
    border: 1px solid #b8d4e3;
    border-radius: 4px;
    margin-left: 20px;
}

.border-width-label {
    font-weight: bold;
    color: #2c5282;
    font-size: 13px;
}

#apert2-border-value {
    font-weight: bold;
    color: #1a365d;
    font-size: 14px;
    min-width: 50px;
    text-align: center;
    background-color: white;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #cbd5e0;
    font-family: 'Courier New', monospace;
}