:root {
    --primary-color: #7f1cb9;
    --secondary-color: #2980b9;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --success-color: #2ecc71;
    --border-radius: 6px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--dark-color);
    line-height: 1.6;
}

/* Header */
.site-header {
    background-color: #1a252f;
    background: linear-gradient(135deg, #1a252f, #2c3e50);
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
}

.logo img {
    height: 40px;
    margin-right: 10px;
    object-fit: cover;
    position: relative;
    top: 5px;
    filter: drop-shadow(0 0 3px rgb(255, 255, 255));
}

.logo a span {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: bolder;
    background: linear-gradient(to right, #aa00ff, #0015ff, #1b9400, #ffae00, #ff0000, #ffae00, #1b9400, #0015ff, #aa00ff);
    background-size: 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: animate-gradient 2.5s linear infinite;
    position: relative;
    top: -3px;
}

@keyframes animate-gradient {
    to {
        background-position: 200%;
    }
}

.logo a {
    text-decoration: none;
    color: white;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-left: 20px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #ffffff;
}

nav a::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

@media (min-width: 350px) and (max-width:390px) {
    .nav-links a {
        margin: 0 0 0 10px;
    }

    .site-header {
        padding: 5px 10px;
    }
}

@media (min-width: 300px) and (max-width:350px) {
    .nav-links a {
        font-size: small;
        margin: 0 0 0 10px;
    }

    .logo {
        gap: 0;
    }

    .logo a span {
        font-size: 1.2rem;
        position: relative;
        top: -5px;
    }

    .site-header {
        padding: 5px 10px;
    }
}


.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px 15px;
    text-align: center;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.calculator {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 15px;
}

@media (min-width: 768px) {
    .calculator {
        grid-template-columns: 1fr 1fr;
        padding: 30px;
        gap: 20px;
    }

    header {
        padding: 30px 20px;
    }

    h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }
}

.input-section,
.results-section {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 15px;
}

@media (min-width: 768px) {

    .input-section,
    .results-section {
        padding: 20px;
    }
}

.input-section h2,
.results-section h2 {
    color: var(--dark-color);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 12px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.95rem;
}

input[type="number"],
input[type="text"],
select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
}

@media (min-width: 768px) {

    input[type="number"],
    input[type="text"],
    select {
        padding: 10px;
        font-size: 16px;
    }

    .input-section h2,
    .results-section h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    width: 100%;
    transition: background-color 0.3s;
}

@media (min-width: 768px) {
    button {
        padding: 12px 20px;
        font-size: 16px;
    }
}

button:hover {
    background-color: var(--secondary-color);
}

.results-display {
    margin-top: 15px;
    overflow-x: auto;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 8px;
    background: white;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .result-item {
        padding: 10px;
        margin-bottom: 10px;
        font-size: 1rem;
    }
}

.result-item.highlight {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.chart-container {
    height: 250px;
    margin-top: 15px;
    position: relative;
}

@media (min-width: 768px) {
    .chart-container {
        height: 300px;
        margin-top: 20px;
    }
}

.tabs {
    display: flex;
    margin-bottom: 15px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.tab {
    padding: 8px 15px;
    cursor: pointer;
    background: #ddd;
    border: none;
    flex: 1;
    text-align: center;
    min-width: 80px;
    font-size: 0.85rem;
}

@media (min-width: 768px) {
    .tab {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

.tab.active {
    background: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.summary-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--box-shadow);
}

@media (min-width: 768px) {
    .summary-card {
        padding: 20px;
        margin-bottom: 20px;
    }
}

.summary-card h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

@media (min-width: 768px) {
    .summary-card h3 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
}

.assumptions {
    font-size: 0.8rem;
    color: #666;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

@media (min-width: 768px) {
    .assumptions {
        font-size: 0.9rem;
        margin-top: 20px;
        padding-top: 20px;
    }
}

.tooltip {
    position: relative;
    display: inline-block;
    margin-left: 5px;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 180px;
    background-color: var(--dark-color);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
    font-weight: normal;
}

@media (min-width: 768px) {
    .tooltip .tooltiptext {
        width: 200px;
        font-size: 0.8rem;
    }
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.hidden {
    display: none;
}

.advanced-toggle {
    text-align: right;
    margin-bottom: 10px;
}

.advanced-toggle button {
    width: auto;
    padding: 5px 10px;
    font-size: 0.85rem;
    background: none;
    color: var(--primary-color);
    text-decoration: underline;
}

.advanced-toggle button:hover {
    background: none;
    color: var(--secondary-color);
}

/* Mobile-specific adjustments */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    .container {
        border-radius: 0;
    }

    header {
        padding: 15px 10px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .calculator {
        padding: 10px;
        gap: 10px;
    }

    .input-section,
    .results-section {
        padding: 12px;
    }

    .input-section h2,
    .results-section h2 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .form-group {
        margin-bottom: 10px;
    }

    label {
        font-size: 0.9rem;
    }

    input[type="number"],
    input[type="text"],
    select {
        padding: 7px 10px;
        font-size: 0.9rem;
    }

    button {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .tab {
        padding: 6px 12px;
        font-size: 0.8rem;
        min-width: 70px;
    }

    .chart-container {
        height: 220px;
    }

    .summary-card h3 {
        font-size: 1rem;
    }

    .result-item {
        font-size: 0.85rem;
        padding: 6px;
    }
}

/* Table styling for mobile */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

th,
td {
    padding: 6px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
    font-weight: 600;
}

@media (min-width: 768px) {
    table {
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 8px;
    }
}

/* Scrollable table on small screens */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.seo-section {
  max-width: 960px;
  margin: 40px auto;
  padding: 30px 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  line-height: 1.8;
  font-size: 1rem;
  color: #212529;
}

.seo-section h2 {
  font-size: 1.8rem;
  color: #4361ee;
  margin-bottom: 20px;
  border-bottom: 2px solid #4361ee;
  padding-bottom: 10px;
}

.seo-section h3 {
  font-size: 1.4rem;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #3f37c9;
}

.seo-section p {
  margin-bottom: 15px;
}

.seo-section ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 20px;
}

.seo-section ul li {
  margin-bottom: 10px;
}

.seo-section ol {
  list-style: decimal;
  padding-left: 20px;
  margin-bottom: 20px;
}

.seo-section ol li {
  margin-bottom: 10px;
}

.seo-section strong {
  color: #4361ee;
}

.seo-section a {
  color: #3f37c9;
  text-decoration: underline;
}

.seo-section a:hover {
  text-decoration: none;
}

footer {
    text-align: center;
    margin-bottom: 20px;
    margin-right: 20px;
    margin-left: 20px;
}

footer p a {
    text-decoration: none;
    color: #aa00ff;
    font-weight: bold;
}