:root {
    --bg-color: #0d0f14;
    --card-bg: rgba(26, 29, 39, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8f9fa;
    --text-secondary: #9ba1a6;
    --accent: #00AE42; /* Bambu Lab Green */
    --accent-glow: rgba(0, 174, 66, 0.4);
    --secondary-accent: #00E55A; /* Bright Green */
    --success: #34d399;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    padding: 2rem 0;
}

/* Background aesthetic orbs */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 50vmin;
    height: 50vmin;
    background: #00762D; /* Darker green */
}

.orb-2 {
    bottom: -15%;
    right: -5%;
    width: 60vmin;
    height: 60vmin;
    background: #004D1D;
}

.orb-3 {
    top: 30%;
    left: 60%;
    width: 30vmin;
    height: 30vmin;
    background: var(--secondary-accent);
    opacity: 0.2;
}

.app-container {
    width: 100%;
    max-width: 540px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 10;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo svg {
    stroke: var(--accent);
}

.toggle-container {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    display: flex;
    padding: 4px;
}

.toggle-container span {
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.toggle-container span.active {
    background: var(--card-border);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.controls-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.action-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 24px;
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 16px 32px rgba(0,0,0,0.2);
}

.card-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    font-weight: 600;
    margin-bottom: -4px;
}

.dimension-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.input-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-block label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.input-block input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-block input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button, 
input[type="number"]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}

.presets {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.preset-btn {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 4px 0;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background: var(--accent);
    color: var(--bg-color);
    border-color: var(--accent);
}

/* Results Layout */
.results-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.breakdown-container {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.breakdown-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.breakdown-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.breakdown-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.total-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#totalCost {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

.total-display small {
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 4px;
}
