body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    box-sizing: border-box;
}

#3d-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.menu-panel {
    position: absolute;
    top: 40px;
    right: 20px;
    width: 200px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}
.results-area {
    position: fixed;
    top: 40px;
    right: 20px;
    display: none;
    flex-direction: column;
    gap: 15px;
    width: 200px;
}
.result-panel {
    width: 100%;
    min-width: 200px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-height: 550px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.result-panel.minimized {
    min-width: auto;
    max-height: 40px;
}
.panel-header {
    display: none;
}
.panel-label {
    font-weight: bold;
    font-size: 14px;
    color: #333;
}
.lamppost-panel .panel-header {
    background-color: #e3f2fd;
    border-bottom-color: #42A5F5;
}
.lamppost-panel .panel-label {
    color: #1565c0;
}
.batterybox-panel .panel-header {
    background-color: #e8f5e9;
    border-bottom-color: #66BB6A;
}
.batterybox-panel .panel-label {
    color: #2e7d32;
}
.panel-actions {
    display: flex;
    gap: 5px;
}
.minimize-btn,
.close-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.minimize-btn {
    background-color: #ddd;
    color: #666;
}
.minimize-btn:hover {
    background-color: #ccc;
}
.panel-content {
    padding: 10px;
    flex: 1;
    overflow-y: auto;
}
h3 {
    display: none;
}
.lamppost-results h3 {
    border-bottom-color: #42A5F5;
}
.batterybox-results h3 {
    border-bottom-color: #66BB6A;
}
.menu-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 200px;
}
.menu-btn {
    padding: 15px 25px;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}
.menu-btn.lamppost-btn {
    background: linear-gradient(135deg, #64B5F6, #42A5F5);
    box-shadow: 0 2px 8px rgba(66, 165, 245, 0.3);
}
.menu-btn.lamppost-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 165, 245, 0.4);
}
.menu-btn.batterybox-btn {
    background: linear-gradient(135deg, #81C784, #66BB6A);
    box-shadow: 0 2px 8px rgba(102, 187, 106, 0.3);
}
.menu-btn.batterybox-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 187, 106, 0.4);
}
.menu-hint {
    margin-top: 20px;
    font-size: 13px;
    color: #666;
    text-align: center;
}
.info-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}
.info-card p {
    margin: 10px 0;
    color: #555;
    font-size: 13px;
    line-height: 1.6;
}
.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
.input-group {
    margin-bottom: 15px;
}
.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    font-size: 13px;
}
.input-group input[type="number"],
.input-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}
.mm-label {
    font-size: 11px;
    color: #666;
    margin-top: 8px;
    margin-bottom: 3px;
}
.mm-input {
    width: 100%;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 12px;
    background-color: #f0f0f0;
    color: #555;
}
.input-row {
    display: flex;
    gap: 8px;
}
.input-with-unit {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    opacity: 0.5;
    cursor: pointer;
    transition: all 0.3s ease;
}
.input-with-unit.active {
    opacity: 1;
    background: white;
    border: 1px solid #4CAF50;
}
.input-with-unit input {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px;
    background: transparent;
    font-size: 14px;
}
.input-with-unit.active input {
    background: white;
}
.input-with-unit .unit {
    padding: 8px;
    background: #eee;
    font-size: 12px;
    color: #666;
    min-width: 40px;
    text-align: center;
}
.input-with-unit.active .unit {
    background: #4CAF50;
    color: white;
}
.mm-input:focus {
    border-color: #4CAF50;
    outline: none;
}
.calc-btn {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}
.calc-btn:hover {
    background-color: #45a049;
}
.lamppost-modal .calc-btn {
    background-color: #42A5F5;
}
.lamppost-modal .calc-btn:hover {
    background-color: #1E88E5;
}
.batterybox-modal .calc-btn {
    background-color: #66BB6A;
}
.batterybox-modal .calc-btn:hover {
    background-color: #43A047;
}
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    font-size: 13px;
}
.result-table th,
.result-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}
.result-table th {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
}
.result-table tr:hover {
    background-color: #f5f5f5;
}
.result-table .highlight-row {
    background-color: #e8f5e9;
}
.result-table .highlight-row td {
    font-weight: bold;
    color: #2e7d32;
}
.lamppost-table th {
    background-color: #42A5F5;
}
.lamppost-table .highlight-row {
    background-color: #e3f2fd;
}
.lamppost-table .highlight-row td {
    color: #1565c0;
}
.batterybox-table th {
    background-color: #66BB6A;
}
.batterybox-table .highlight-row {
    background-color: #e8f5e9;
}
.batterybox-table .highlight-row td {
    color: #2e7d32;
}
.cost-explanation {
    background-color: #fff3cd;
    padding: 10px;
    border-radius: 4px;
    font-size: 11px;
    color: #856404;
    line-height: 1.5;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-content {
    background-color: white;
    border-radius: 12px;
    max-width: 95%;
    width: 95%;
    max-height: 85vh;
    height: auto;
    margin: 5vh 2.5%;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}
.modal-header {
    background-color: #4CAF50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.lamppost-modal .modal-header {
    background-color: #42A5F5;
}
.batterybox-modal .modal-header {
    background-color: #66BB6A;
}
.modal-header h3 {
    margin: 0;
    font-size: 18px;
    border-bottom: none;
    padding-bottom: 0;
}
.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0 10px;
}
.close-btn:hover {
    color: #eee;
}
.modal-body {
    padding: 15px;
    max-height: calc(75vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
}

.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    border-top: 1px solid #e0e0e0;
}

.tab-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #999999;
}

.tab-item:hover {
    background-color: #f5f5f5;
}

.tab-item.active {
    color: #42A5F5;
}

.tab-item.confirmed {
    color: #4CAF50;
}

.tab-item.reset-tab {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 30px;
}

.tab-icon {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 4px;
}

.tab-label {
    font-size: 12px;
}

/* Result modal styles */
.result-section {
    background-color: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.result-section:last-child {
    margin-bottom: 0;
}

.result-section h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 16px;
    border-bottom: 2px solid #42A5F5;
    padding-bottom: 8px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    color: #666;
    font-weight: 500;
}

.result-value {
    color: #333;
    font-weight: 600;
}

.confirm-modal {
    max-width: 350px;
    text-align: center;
}

.confirm-modal .modal-header {
    justify-content: center;
    padding-bottom: 10px;
}

.confirm-modal .modal-header h3 {
    display: block;
    margin: 0;
    padding: 0;
    border: none;
    color: #333;
}

.confirm-modal .modal-body p {
    font-size: 15px;
    color: #555;
    margin: 0;
}

.modal-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

.confirm-btn {
    padding: 10px 30px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background-color: #e0e0e0;
    color: #333;
}

.cancel-btn:hover {
    background-color: #bdbdbd;
}

.ok-btn {
    background-color: #4CAF50;
    color: white;
}

.ok-btn:hover {
    background-color: #43A047;
}