:root {
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --primary-color: #8b5cf6;
    --secondary-color: #ec4899;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(15, 23, 42, 0.6);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background Gradients */
body::before, body::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
}

body::before {
    background: var(--primary-color);
    top: -50px;
    left: -50px;
}

body::after {
    background: var(--secondary-color);
    bottom: -50px;
    right: -50px;
}

/* Typography */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    color: #fff;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

header {
    padding: 20px 0;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
}

.nav-links a:hover {
    color: #fff;
}

/* Main Content */
main {
    flex: 1;
    padding: 40px 0;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Form Elements */
.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #cbd5e1;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol, .percent-symbol {
    position: absolute;
    color: #94a3b8;
    pointer-events: none;
}

.currency-symbol {
    left: 12px;
}

.percent-symbol {
    right: 12px;
}

input[type="number"], select {
    width: 100%;
    padding: 12px 16px;
    padding-left: 30px; /* Space for symbol */
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="number"]:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

select {
    padding-left: 16px;
}

button.calculate-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    margin-top: 10px;
}

button.calculate-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Results Section */
.results-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.summary-item {
    background: rgba(15, 23, 42, 0.4);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.summary-label {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.summary-value.highlight {
    color: var(--secondary-color);
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Footer */
footer {
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
    background: rgba(15, 23, 42, 0.8);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.9rem;
}

.copyright {
    color: #64748b;
    font-size: 0.9rem;
}
