* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 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 {
   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 */
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 Styles */
.calculator-form {
    padding: 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
    transition: all 0.2s;
    color: #333;
}

select.form-input,
.unit-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    cursor: pointer;
    color: #333;
    background: white url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23333333' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
}

.form-input:hover,
.unit-select:hover {
    border-color: #003049;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
}

.form-input:focus,
.unit-select:focus {
    outline: none;
    border-color: #003049;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
}

.input-unit-group {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.input-unit-group .form-input {
    min-width: 0;
    width: 0;
    flex: 1;
}

.unit-select {
    width: 130px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
    transition: all 0.2s;
}

/* Button Styles */
.action-button {
    width: 100%;
    padding: 8px 16px;
    background: #003049;
    border: 1px solid #003049;
    border-radius: 4px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.action-button:hover {
    background: #00436b;
    border-color: #00436b;
}

.reset-button {
    width: 100%;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    transition: all 0.2s ease;
}

.reset-button:hover {
    background: #f5f5f5;
    border-color: #003049;
}

/* Error Styles */
.form-input.error {
    border-color: #dc2626;
    background-color: #fff;
}

.form-input.error:hover {
    border-color: #dc2626;
    box-shadow: 0 1px 2px rgba(220, 38, 38, 0.1);
}

.form-input.error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.error-message {
    color: #dc2626;
    font-size: 14px;
    margin-top: 4px;
    display: none;
}

.error-message.visible {
    display: block;
}

/* Results Section */
.results {
    background: linear-gradient(to bottom right, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 4px;
    padding: 16px;
    margin-top: 24px;
}

.results.hidden {
    display: none;
}

.results-header {
    margin-bottom: 16px;
}

.results-title {
    font-size: 18px;
    color: #003049;
    margin: 0;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #bae6fd;
}

.results-content {
    border: none;
}

.results-section {
    padding: 0;
    border: none;
    margin-bottom: 16px;
}

.results-section:last-child {
    margin-bottom: 0;
}

.results-section-title {
    color: #003049;
    font-weight: 500;
    margin-bottom: 8px;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0;
}

.results-item {
    color: #003049;
    font-size: 16px;
}

.project-details-grid {
    grid-template-columns: 1fr;
}

.results-value {
    font-weight: 500;
    font-size: 16px;
}

.results-total {
    padding: 16px 0 0 0;
    background: none;
    border-top: 1px solid #bae6fd;
    margin-top: 16px;
}

.total-cost {
    font-weight: 600;
    font-size: 16px;
    color: #003049;
}

/* Remove number input spinners */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* Media Queries */
@media (max-width: 640px) {
    .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;
    }
    
    .results {
        padding: 12px;
    }
    
    .results-grid {
        gap: 12px;
    }
}

@media (max-width: 480px) {
   .header {
       position: fixed;
   }
   
   body {
       padding-top: 3.5rem;
   }
   
   .logo-icon {
       font-size: 1.5rem;
   }
}