* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: #f5f7fb;
    color: #1a2b4b;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a2b4b;
    margin-bottom: 0.5rem;
}

.header p {
    color: #64748b;
    font-size: 1.1rem;
}

.calculator-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
}

.input-panel {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group h3 {
    font-size: 1.1rem;
    color: #334155;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
}

input, select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.15s ease;
    margin-bottom: 1rem;
}

input:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

button {
    width: 100%;
    background-color: #3b82f6;
    color: white;
    padding: 0.875rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

button:hover {
    background-color: #2563eb;
}

.visualization-panel {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.visualization-tabs {
    display: flex;
    padding: 0.5rem;
    gap: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.visualization-tab {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    transition: all 0.15s ease;
}

.visualization-tab.active {
    background: #3b82f6;
    color: white;
}

.visualization-tab:hover:not(.active) {
    background: #f1f5f9;
}

.visualization {
    flex: 1;
    padding: 1rem;
    display: none;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    position: relative;
}

.visualization.active {
    display: flex;
}

#camera-viz, #topdown-viz {
    max-width: 100%;
    height: auto;
}

.result {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.result h3 {
    color: #334155;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.result p {
    margin-bottom: 0.75rem;
    color: #475569;
    font-size: 0.95rem;
}

.result ul {
    list-style: none;
    margin-left: 0.5rem;
}

.result li {
    margin-bottom: 0.5rem;
    color: #475569;
    font-size: 0.95rem;
}

.dimension-label {
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.info-box {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #1e40af;
}

@media (max-width: 1024px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 1rem;
    }
}