@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette - Green/Teal Theme for ROI */
    --primary-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --secondary-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --accent-gradient: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);

    --primary-color: #43e97b;
    --secondary-color: #38f9d7;
    --accent-color: #30cfd0;
    --success-color: #11998e;
    --warning-color: #fee140;
    --danger-color: #fa709a;

    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #a0aec0;

    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    --bg-card: #ffffff;

    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);

    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

header .container {
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.logo svg {
    transition: transform var(--transition-base);
}

.logo:hover svg {
    transform: rotate(5deg) scale(1.05);
}

/* Hero Section */
.hero {
    background: var(--primary-gradient);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.95;
    font-weight: 400;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-features {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.feature-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(10px);
    font-weight: 500;
    transition: all var(--transition-base);
}

.feature-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Calculator Section */
.calculator-section {
    padding: 80px 0;
}

.calculator-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-width: 700px;
    margin: 0 auto 3rem;
    animation: fadeInUp 0.8s ease-out;
}

.calculator-header {
    background: var(--primary-gradient);
    color: white;
    padding: 2rem;
    text-align: center;
}

.calculator-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.mode-toggle {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem;
    border-radius: var(--border-radius-md);
    backdrop-filter: blur(10px);
    max-width: 500px;
    margin: 0 auto;
}

.mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.9rem;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mode-btn.active {
    background: white;
    color: var(--success-color);
    box-shadow: var(--shadow-md);
}

.calculator-body {
    padding: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-wrapper {
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-base);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 500;
    padding-right: 4rem;
}

.input-icon {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: 600;
    pointer-events: none;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(67, 233, 123, 0.1);
}

.input-group input:hover {
    border-color: var(--primary-color);
}

.input-help {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.results {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    border: 2px solid var(--border-color);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.result-value:hover {
    color: var(--primary-color);
}

.result-item.highlight {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.1) 0%, rgba(56, 249, 215, 0.1) 100%);
    margin: 0 -1.5rem;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-sm);
}

.result-item.highlight .result-value {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
}

.result-item.total {
    margin-top: 0.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--primary-color);
}

.result-item.total .result-value {
    font-size: 2rem;
    color: var(--success-color);
}

.result-value.positive {
    color: var(--success-color) !important;
}

.result-value.negative {
    color: var(--danger-color) !important;
}

/* Interpretation Section */
.interpretation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.05) 0%, rgba(56, 249, 215, 0.05) 100%);
    border-radius: var(--border-radius-md);
    border-left: 4px solid var(--primary-color);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.interpretation-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.interpretation p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.info-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-base);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

.info-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.about-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.about-section h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-content ol,
.about-content ul {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.about-content li {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.formula-box {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-color);
}

.formula-box h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.formula-box code {
    display: block;
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: var(--success-color);
    margin-bottom: 1rem;
    overflow-x: auto;
    white-space: nowrap;
}

.formula-box p {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
}

/* FAQ Section */
.faq-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.faq-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.faq-item {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.faq-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.faq-item h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Footer */
footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-light);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.footer-bottom a {
    color: var(--text-light);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: white;
}

.disclaimer {
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-features {
        flex-direction: column;
        align-items: center;
    }

    .calculator-header h2 {
        font-size: 1.5rem;
    }

    .mode-toggle {
        flex-direction: column;
    }

    .button-group {
        grid-template-columns: 1fr;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-section h2,
    .faq-section h2 {
        font-size: 2rem;
    }

    .formula-box code {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .calculator-section {
        padding: 40px 0;
    }

    .calculator-body {
        padding: 1.5rem;
    }

    .result-value {
        font-size: 1.25rem;
    }

    .result-item.highlight .result-value,
    .result-item.total .result-value {
        font-size: 1.5rem;
    }

    .logo h2 {
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {

    header,
    footer,
    .hero,
    .info-cards,
    .about-section,
    .faq-section {
        display: none;
    }

    .calculator-card {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}