:root {
    --primary-color: #1d4ed8;
    --primary-hover: #1e40af;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-color: #1f2937;
    --border-color: #e5e7eb;
    --shadow-color: rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    background: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.header {
    background: var(--card-background);
    box-shadow: 0 1px 3px var(--shadow-color);
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shopping-bag {
    color: var(--primary-color);
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-color);
}

nav ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

nav a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--primary-color);
}

/* Main Content Styles */
main {
    flex-grow: 1;
    padding: 2rem 0;
}

.calculator-wrapper {
    max-width: 1024px;
    margin: 0 auto;
}

.calculator {
    background: var(--card-background);
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px var(--shadow-color);
    overflow: hidden;
    padding: 2rem;
}

.calculator h2 {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.input-with-icon {
    position: relative;
}

.currency-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
}

input, select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    padding-left: 2.40rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

small {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.calculate-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.calculate-btn:hover {
    background: var(--primary-hover);
}

.currency-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

/* Result Styles */
.result-section {
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    border-radius: 0.5rem;
    padding: 1rem;
}

.final-price {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1);
}

.final-price h3 {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.price-amount {
    font-size: 1.875rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.final-price p {
    font-size: 0.875rem;
    opacity: 0.75;
}

.price-breakdown {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.price-breakdown h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

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

.breakdown-item span:first-child {
    color: #6b7280;
}

.breakdown-item span:last-child {
    font-weight: 500;
}

.hidden {
    display: none;
}

/* Footer Styles */
.footer {
    background: #1f2937;
    color: white;
    padding: 1.5rem 0;
    margin-top: auto;
}

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

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}
