:root {
    --terc-primary: #0ea5e9;
    --terc-primary-dark: #0284c7;
    --terc-secondary: #14b8a6;
    --terc-accent: #f59e0b;
    --terc-accent-dark: #d97706;
    --terc-text: #1e293b;
    --terc-text-light: #64748b;
    --terc-bg: #f8fafc;
    --terc-card-bg: rgba(255, 255, 255, 0.8);
    --terc-card-border: rgba(255, 255, 255, 0.5);
    --terc-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --terc-shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, 0.25);
    --terc-radius: 12px;
    --terc-transition: all 0.3s ease;
}

[data-theme="dark"] {
    --terc-text: #f1f5f9;
    --terc-text-light: #cbd5e1;
    --terc-bg: #0f172a;
    --terc-card-bg: rgba(30, 41, 59, 0.7);
    --terc-card-border: rgba(255, 255, 255, 0.1);
}

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

.terc-container {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--terc-text);
    background: var(--terc-bg);
    transition: var(--terc-transition);
    background-image: radial-gradient(circle at 15% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 25%), radial-gradient(circle at 85% 30%, rgba(20, 184, 166, 0.1) 0%, transparent 25%);
    padding: 2rem 1rem;
}

.terc-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.terc-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--terc-primary), var(--terc-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.terc-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--terc-text-light);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.terc-theme-toggle {
    position: absolute;
    top: 0;
    right: 1rem;
    background: var(--terc-card-bg);
    border: 1px solid var(--terc-card-border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--terc-transition);
}

.terc-theme-toggle:hover {
    transform: rotate(15deg);
}

.terc-calculator-container {
    background: var(--terc-card-bg);
    border-radius: var(--terc-radius);
    box-shadow: var(--terc-shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--terc-card-border);
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}

/* Continue with all the CSS from the original HTML file, prefixing with terc- */
/* The rest of the CSS would be identical but with terc- prefix on all classes */