:root {
    --primary: #f472b6;
    /* Soft Pink */
    --primary-dark: #db2777;
    --secondary: #fb7185;
    /* Rose */
    --bg-gradient: linear-gradient(135deg, #fff1f2 0%, #f5f3ff 100%);
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-main: #4c1d95;
    /* Deep Purple for better contrast with pinks */
    --text-muted: #9d174d;
    --accent: #f472b6;
    --shadow: 0 10px 30px -5px rgba(244, 114, 182, 0.1), 0 8px 15px -6px rgba(0, 0, 0, 0.05);
    --glass-border: rgba(255, 255, 255, 0.5);
    --nav-bg: rgba(255, 255, 255, 0.6);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-nav {
    padding: 15px 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--glass-border);
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 100px;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.btn-back:hover {
    transform: translateX(-4px);
    background: var(--primary);
    color: white;
}

.app-container {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.025em;
}

.hero .accent {
    color: var(--primary);
    position: relative;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.calculator-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
    transition: transform 0.3s ease;
}

.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="number"] {
    width: 100%;
    padding: 16px 20px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    font-size: 1.1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
}

input[type="number"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.unit {
    position: absolute;
    right: 20px;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.result-container {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

.result-container.hidden {
    display: none;
}

.result-container p {
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.result-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.result-value span {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.result-value small {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-muted);
}

.content-section {
    margin-top: 60px;
}

.content-section h2 {
    font-size: 1.75rem;
    margin-bottom: 20px;
}

.faq-section {
    margin-top: 40px;
}

.faq-item {
    margin-bottom: 24px;
    background: white;
    padding: 24px;
    border-radius: 16px;
    border-left: 4px solid var(--secondary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.faq-item h4 {
    margin-bottom: 8px;
    color: var(--text-main);
}

.content-section p {
    margin-bottom: 20px;
    color: var(--text-main);
}

.featured-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 20px;
    margin: 20px auto 40px;
    display: block;
    box-shadow: var(--shadow);
}

.table-wrapper {
    overflow-x: auto;
    margin: 30px 0;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th,
td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: #f9fafb;
    font-weight: 600;
    color: var(--primary);
}

tr:last-child td {
    border-bottom: none;
}

.content-section ul {
    margin-bottom: 30px;
    padding-left: 20px;
}

.content-section ul li {
    margin-bottom: 15px;
}

.app-footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body::before,
body::after {
    content: '';
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
}

body::before {
    background: #fbcfe8;
    top: -50px;
    right: -50px;
}

body::after {
    background: #ede9fe;
    bottom: -50px;
    left: -50px;
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 2rem;
    }

    .calculator-card {
        padding: 24px;
    }

    .result-value span {
        font-size: 2.5rem;
    }
}