* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html {
    overflow-y: scroll;
}

/* Header styles */
.header {
    background-color: #003049;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-content {
    height: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    gap: 0.25rem;
}

.logo-icon {
    font-size: 2rem;
    color: white;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: bold;
}

.beta-badge {
    background-color: #3b82f6;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    gap: 0.25rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #bfdbfe;
}

body {
    background-color: #f5f5f5;
    min-height: 100vh;
    padding-top: 0px;
    margin: 0;
}

/* Container and layout */
.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.calculator-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 24px;
    position: relative;
    margin-top: 20px;
}

/* Header styles */
h1 {
    background-color: #fcbf49;
    margin: -24px -24px 24px -24px;
    padding: 16px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

/* Form elements */
.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

/* Enhanced input and select styles */
input, select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
    transition: all 0.2s ease;
}

/* Enhanced select specific styles */
select {
    padding: 8px 32px 8px 12px;  /* Increased right padding for arrow */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select option {
    padding: 8px;
    background-color: white;
}

select:disabled {
    background-color: #f5f5f5;
    border-color: #ddd;
    color: #666;
    cursor: not-allowed;
}

select:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 #000;
}

select::-ms-expand {
    display: none;
}

/* Hover states */
input:hover, select:hover {
    border-color: #bfdbfe;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Focus states */
input:focus, select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: none;
    background-color: white;
}

/* Price input specific styling */
.price-input {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 12px;
    color: #666;
}

.price-input input {
    padding-left: 24px;
}

/* Input sections */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.common-inputs {
    margin-top: 8px;
}

/* Dimension inputs */
.dimension-input {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    align-items: flex-end;
}

.input-group {
    flex: 2;
    display: flex;
    flex-direction: column;
}

.unit-select {
    width: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.unit-select select {
    margin-top: auto;
    min-width: 120px;
    max-width: 100%;
}

/* Image section */
.image-section {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.image-section img {
    width: 100%;
    max-width: 400px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Button styles */
.calculate-button {
    width: 100%;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: #003049;
    color: white;
    border: 1px solid #003049;
}

.calculate-button:hover {
    background: #00436b;
    border-color: #00436b;
}

.calculate-button:active {
    transform: translateY(1px);
}

.reset-button {
    width: 100%;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    background: white;
    border: 1px solid #ddd;
    color: #333;
    margin-top: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-button:hover {
    background: #f5f5f5;
    border-color: #003049;
}

/* Updated Results Section */
.results {
    background: linear-gradient(to bottom right, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 4px;
    padding: 16px;
    margin-top: 24px;
}

.results-header {
    margin-bottom: 16px;
}

.results-title {
    color: #003049;
    font-size: 18px;
    margin: 0;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #bae6fd;
}

.results-section {
    padding: 0;
    margin-bottom: 16px;
}

.results-section:not(:last-child) {
    border-bottom: 1px solid #bae6fd;
    padding-bottom: 16px;
}

.results-section-title {
    color: #003049;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.result-item {
    display: flex;
    gap: 8px;
    align-items: center;
    color: #003049;
}

.result-item .label {
    color: #003049;
    min-width: 140px;
}

.result-item .value {
    font-weight: 500;
}

.note {
    font-size: 14px;
    color: #666;
    margin-top: 12px;
    font-style: italic;
}

/* Utility classes */
.hidden {
    display: none;
}

/* Error states */
.input-error {
    border-color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 4px;
}

/* Remove number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Media queries */
@media (max-width: 768px) {
    select {
        opacity: 1;
        -webkit-text-fill-color: inherit;
        color: inherit;
    }
	
	.dimension-input {
        display: grid;
        grid-template-columns: 3fr 1fr;
        gap: 8px;
        align-items: flex-end;
    }

    .input-group {
        grid-column: 1;
    }

    .unit-select {
        grid-column: 2;
        width: 100%;
        display: flex;
        align-items: flex-end;
    }

    .unit-select select {
        margin-top: auto;
    }
	
	.unit-select select,
    .form-group select {
        color: #333;
        -webkit-text-fill-color: #333;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .calculator-wrapper {
        padding: 16px;
    }
    
    .header-container {
        padding: 0 1rem;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .beta-badge {
        font-size: 0.625rem;
        padding: 0.125rem 0.375rem;
    }
    
    .header-content {
        height: 3.5rem;
    }
    
    .calculator-wrapper {
        padding: 16px;
    }
    
    h1 {
        margin: -16px -16px 16px -16px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .header {
        position: fixed;
    }
    
    body {
        padding-top: 3.5rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
}