:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #4895ef;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4cc9f0;
    --danger: #f72585;
    --border-radius: 8px;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7f1 100%);
    min-height: 100vh;
    padding: 10px;
    color: var(--dark);
}

/* Header */
.site-header {
   background-color:rgb(88, 88, 249);
    color: white;	
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;	
}	

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
    object-fit: cover;
    position: relative;
    top: 2px;
    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;
}

@keyframes animate-gradient {
    to {
        background-position: 200%;
    }
}

.logo a {
    text-decoration: none;
    color: white;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-size: 1rem;
    font-weight: bold;
}

.nav-links a:hover {
    text-decoration: underline;
    color: aqua;
}

@media (min-width: 300px) and (max-width:350px) {
    .nav-links a{
        font-size: small;
        margin: 0 0 0 10px;
    }
    
    .site-header {
        padding: 5px 10px;
    }
}


.container {
    max-width: 800px;
    width: 100%;
    margin: 40px auto;
}

.calculator-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-height: 100vh;
}

.input-section {
    padding: 15px;
    background: linear-gradient(145deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
}

.results-section {
    padding: 15px;
    background: white;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3 {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 6px;
}

h3 {
    font-size: 1rem;
}

h1 i {
    background: rgba(255, 255, 255, 0.2);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
}

.subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.input-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.85rem;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.currency-selector {
    position: relative;
    min-width: 60px;
}

.currency-selector select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    font-size: 0.8rem;
}

.currency-selector::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
    font-size: 0.7rem;
}

.input-container input[type="number"] {
    flex: 1;
    padding: 8px 10px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8rem;
}

.range-container {
    position: relative;
    margin-top: 8px;
}

input[type="range"] {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.value-display {
    background: white;
    color: var(--primary);
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.7rem;
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: var(--shadow);
    white-space: nowrap;
}

.value-display::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid white;
}

.tenure-options {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.tenure-option {
    flex: 1;
    text-align: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
}

.tenure-option.active {
    background: white;
    color: var(--primary);
    font-weight: 600;
}

.calculate-btn {
    width: 100%;
    padding: 12px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.result-card {
    background: var(--light);
    border-radius: var(--border-radius);
    padding: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    min-width: 0;
}

.result-card .title {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 6px;
}

.result-card .value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    word-break: break-word;
}

.result-card .value.small {
    font-size: 1rem;
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.chart-box {
    background: var(--light);
    border-radius: var(--border-radius);
    padding: 12px;
    box-shadow: var(--shadow);
    min-width: 0;
}

.chart-title {
    text-align: center;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.8rem;
}

.chart-container {
    height: 160px;
    position: relative;
}

.amortization-title {
    margin: 15px 0 8px;
    font-size: 1rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.amortization-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: 0.7rem;
}

.amortization-table th {
    background: var(--primary);
    color: white;
    padding: 8px 10px;
    text-align: left;
    font-size: 0.75rem;
}

.amortization-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.amortization-table tr:last-child td {
    border-bottom: none;
}

.amortization-table tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.table-container {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 6px;
    border-radius: var(--border-radius);
    -webkit-overflow-scrolling: touch;
}

.summary-card {
    background: var(--light);
    border-radius: var(--border-radius);
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.summary-title {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    font-size: 0.8rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px dashed #ddd;
}

.summary-item:last-child {
    border-bottom: none;
    font-weight: 600;
    color: var(--primary);
}

.custom-input {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#toggleSchedule {
    background: rgba(67, 97, 238, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    transition: var(--transition);
    border: none;
    color: var(--primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
}

#toggleSchedule:hover {
    background: rgba(67, 97, 238, 0.2);
}

#toggleSchedule i {
    font-size: 0.6rem;
}

.principal-color {
    color: #4cc9f0;
    font-weight: 600;
}

.interest-color {
    color: #f72585;
    font-weight: 600;
}

/* Print styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .calculator-card {
        box-shadow: none;
        min-height: auto;
    }

    .input-section {
        display: none;
    }

    .result-card,
    .chart-box,
    .summary-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .table-container {
        max-height: none;
        overflow: visible;
    }

    .calculate-btn,
    #toggleSchedule {
        display: none;
    }
}


.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: 0 15px 20px 15px;
}

footer p a {
    text-decoration: none;
    color: #aa00ff;
    font-weight: bold;
}