.golden-cal-container {
    max-width: 650px;
    margin: 0 auto;
    font-family: 'Noto Sans KR', sans-serif;
    color: #333;
    padding: 10px;
}

h1 { color: #0056b3; }

.calculator-box {
    background: #fff;
    padding: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* Precision Slider */
.precision-control {
    margin-bottom: 25px;
    padding: 15px;
    background: #f1f8ff;
    border-radius: 8px;
    border: 1px solid #cce5ff;
}

.reset-mini-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    background: #007bff; /* 파란색 테마로 통일 */
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

.reset-mini-btn:hover { background: #5a6268; }

.phi-display {
    margin-top: 8px;
    font-family: monospace;
    font-size: 0.95em;
    color: #666;
    word-break: break-all;
}

#phiValue { color: #d9534f; font-weight: bold; }

/* Visualization Layout */
.visualizer-wrapper {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 5px;
}

.vertical-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
    height: 340px;
}

.axis-label-top, .axis-label-bottom {
    font-size: 0.8em;
    color: #888;
    height: 20px;
    width: 100%;
    text-align: center;
}

.slider-vertical-container {
    height: 300px;
}

input[type="range"][orientation="vertical"],
input[type="range"][aria-orientation="vertical"] {
    writing-mode: bt-lr;
    -webkit-appearance: slider-vertical;
    width: 12px;
    height: 100%;
}

.rect-display-area {
    flex: 1;
    height: 300px;
    background: #f8f9fa;
    border: 1px dashed #ced4da;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    background-image: 
        linear-gradient(rgba(0,0,0,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

.golden-rectangle {
    position: absolute;
    left: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.2);
    border: 2px solid #007bff;
}

.rect-label-h, .rect-label-v {
    position: absolute;
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: bold;
    color: #007bff;
    border: 1px solid #007bff;
    white-space: nowrap;
}

.rect-label-h {
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
}

.rect-label-v {
    left: 12px;
    top: 50%;
    transform: rotate(-90deg) translateX(50%);
    transform-origin: left center;
}

/* Horizontal Slider & Buttons */
.horizontal-control-group {
    margin-left: 75px; 
    margin-top: 5px;
    margin-bottom: 30px;
}

.slider-horizontal-container {
    width: 100%;
}

input[type="range"] {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

.horizontal-axis-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: #888;
    margin-bottom: 5px;
}

/* Input Section */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
    font-size: 0.9em;
}

.input-copy-group { 
    display: flex; 
    gap: 8px; 
    width: 100%;
    align-items: center;
}

.input-copy-group input[type="number"] {
    flex: 1;
    min-width: 0; /* 폭 유연성 확보 */
    padding: 10px;
    border: 2px solid #007bff;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
}

.copy-btn {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.copy-btn:hover { background: #218838; }
.scale-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.scale-buttons button {
    height: 44px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    padding: 0 10px;
}

/* 배율 조절 버튼은 더 넓게 공간 차지 */
.scale-buttons button:not(#resetScaleBtn) {
    flex: 2;
}

/* 초기화 버튼은 찌그러지지 않도록 고정 폭 성격 부여 */
#resetScaleBtn {
    flex: 0 0 50px; /* 고정 너비 할당 */
    font-size: 1.2em;
}

    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95em;
}

#resetScaleBtn {
    max-width: 50px; /* 초기화 버튼만 작게 */
    font-size: 1.1em;
}

.scale-buttons button:hover { background: #0056b3; }

.info-section {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

@media (max-width: 500px) {
    .horizontal-control-group { margin-left: 55px; }
    .slider-vertical-container, .rect-display-area { height: 200px; }
    .vertical-control { width: 40px; height: 240px; }
    
    .input-copy-group input[type="number"] {
        font-size: 1em;
        padding: 8px;
    }
    
    .copy-btn {
        width: 42px;
        height: 42px;
    }
}
