/* Custom styling for CalcPro */

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light theme (default) */
[data-bs-theme="light"] body {
    background-color: #f0f2f5;
    color: #333;
}

/* Dark theme */
[data-bs-theme="dark"] body {
    background-color: #121212;
    color: #f5f5f5;
}

/* Add Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Card styling */
.card {
    border-radius: 16px;
    border: none;
    box-shadow: rgba(17, 12, 46, 0.08) 0px 48px 100px 0px;
    transition: all 0.4s ease;
    margin-bottom: 2rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-7px);
    box-shadow: rgba(17, 12, 46, 0.12) 0px 48px 100px 0px;
}

.card-header {
    background: linear-gradient(135deg, #6e8efb, #4a77e5);
    color: white;
    border-radius: 16px 16px 0 0 !important;
    padding: 1.25rem;
    font-weight: 600;
    border-bottom: none;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    width: 70%;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* Light theme card body */
[data-bs-theme="light"] .card-body {
    padding: 1.75rem;
    background-color: white;
}

/* Dark theme card body */
[data-bs-theme="dark"] .card-body {
    padding: 1.75rem;
    background-color: #1e1e1e;
    color: #f5f5f5;
}

/* Dark theme card */
[data-bs-theme="dark"] .card {
    box-shadow: rgba(0, 0, 0, 0.2) 0px 20px 50px 0px;
}

/* Form elements */
.form-control {
    border-radius: 10px;
    padding: 0.625rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s;
}

/* Light theme form controls */
[data-bs-theme="light"] .form-control {
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* Dark theme form controls */
[data-bs-theme="dark"] .form-control {
    border: 1px solid #2d3748;
    background-color: #2d3748;
    color: #f5f5f5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.form-control:focus {
    border-color: #4a77e5;
    transform: translateY(-2px);
}

[data-bs-theme="light"] .form-control:focus {
    box-shadow: 0 0 0 3px rgba(74, 119, 229, 0.15);
}

[data-bs-theme="dark"] .form-control:focus {
    box-shadow: 0 0 0 3px rgba(74, 119, 229, 0.25);
}

/* Form labels */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

[data-bs-theme="light"] .form-label {
    color: #4a5568;
}

[data-bs-theme="dark"] .form-label {
    color: #e2e8f0;
}

/* Input groups */
.input-group {
    border-radius: 10px;
    overflow: hidden;
}

[data-bs-theme="light"] .input-group {
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

[data-bs-theme="dark"] .input-group {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Input group text */
[data-bs-theme="light"] .input-group-text {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #4a5568;
}

[data-bs-theme="dark"] .input-group-text {
    background-color: #2d3748;
    border: 1px solid #2d3748;
    color: #e2e8f0;
}

.input-group-text {
    font-weight: 500;
    padding: 0.625rem 1rem;
}

/* Result containers */
.result-container {
    border-radius: 12px;
    padding: 1.25rem !important;
    border-left: 5px solid #4a77e5;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

/* Light theme result containers */
[data-bs-theme="light"] .result-container {
    background-color: #f9fafc;
    box-shadow: 0 3px 10px rgba(0,0,0,0.03);
}

/* Dark theme result containers */
[data-bs-theme="dark"] .result-container {
    background-color: #2d3748;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.result-container:hover {
    transform: translateX(3px);
}

[data-bs-theme="light"] .result-container:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

[data-bs-theme="dark"] .result-container:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Button styling */
.btn {
    border-radius: 10px;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-primary {
    background: linear-gradient(135deg, #6e8efb, #4a77e5);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5d7ef9, #3967d3);
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

/* Icons and highlights */
.text-primary {
    color: #4a77e5 !important;
}

.text-success {
    color: #38b2ac !important;
}

.text-danger {
    color: #e53e3e !important;
}

.text-warning {
    color: #ecc94b !important;
}

/* Highlight animation for result changes */
@keyframes highlight-light {
    0% {
        background-color: rgba(74, 119, 229, 0.2);
        transform: scale(1.03);
    }
    100% {
        background-color: #f9fafc;
        transform: scale(1);
    }
}

@keyframes highlight-dark {
    0% {
        background-color: rgba(74, 119, 229, 0.3);
        transform: scale(1.03);
    }
    100% {
        background-color: #2d3748;
        transform: scale(1);
    }
}

[data-bs-theme="light"] .highlight {
    animation: highlight-light 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-bs-theme="dark"] .highlight {
    animation: highlight-dark 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Profit & Loss result styling */
#result-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto;
    background: rgba(74, 119, 229, 0.1);
    transition: all 0.3s ease;
}

#result-message {
    margin-top: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Headers and text */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.025em;
}

h1 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

/* Navigation */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

[data-bs-theme="light"] .navbar {
    background-color: #ffffff;
    box-shadow: 0 1px 15px rgba(0,0,0,0.04);
}

[data-bs-theme="dark"] .navbar {
    background-color: #1a202c;
    box-shadow: 0 1px 15px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.025em;
}

[data-bs-theme="dark"] .navbar-brand {
    color: #f5f5f5;
}

.navbar .nav-link {
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
}

[data-bs-theme="light"] .navbar .nav-link {
    color: #4a5568;
}

[data-bs-theme="dark"] .navbar .nav-link {
    color: #e2e8f0;
}

.navbar .nav-link:hover, 
.navbar .nav-link.active {
    transform: translateY(-2px);
}

[data-bs-theme="light"] .navbar .nav-link:hover, 
[data-bs-theme="light"] .navbar .nav-link.active {
    background-color: rgba(74, 119, 229, 0.1);
    color: #4a77e5;
}

[data-bs-theme="dark"] .navbar .nav-link:hover, 
[data-bs-theme="dark"] .navbar .nav-link.active {
    background-color: rgba(74, 119, 229, 0.2);
    color: #6e8efb;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

/* Footer styling */
footer {
    border-top: none !important;
    transition: all 0.3s ease;
}

[data-bs-theme="light"] footer {
    background: linear-gradient(to right, #f8f9fa, #f0f2f5);
    box-shadow: 0 -1px 15px rgba(0,0,0,0.03);
}

[data-bs-theme="dark"] footer {
    background: #1a202c;
    box-shadow: 0 -1px 15px rgba(0,0,0,0.1);
}  

footer p a  { 
  text-decoration: none;
  color: gray;

}

/* Theme toggle icons */
.dark-icon, .light-icon, .dark-text, .light-text {
    transition: all 0.3s ease;
}

[data-bs-theme="light"] .dark-icon,
[data-bs-theme="light"] .dark-text {
    display: inline-block !important;
}

[data-bs-theme="light"] .light-icon,
[data-bs-theme="light"] .light-text {
    display: none !important;
}

[data-bs-theme="dark"] .dark-icon,
[data-bs-theme="dark"] .dark-text {
    display: none !important;
}

[data-bs-theme="dark"] .light-icon,
[data-bs-theme="dark"] .light-text {
    display: inline-block !important;
}

/* Form switch styling */
.form-check-input {
    cursor: pointer;
}

.form-switch .form-check-input {
    height: 1.25rem;
    width: 2.5rem;
}

.form-switch .form-check-input:checked {
    background-color: #4a77e5;
    border-color: #4a77e5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1.25rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .navbar .nav-link {
        padding: 0.5rem 0.75rem;
    }
    
    .result-container {
        padding: 1rem !important;
    }
}





/* Main Container */
.calcpro-info-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
}

/* Card Styling */
.info-card {
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.card-header h2 {
    font-size: 1.4rem;
    margin: 0;
    color: #1a1a1a;
}

.icon {
    font-size: 1.8rem;
}

.info-card p {
    color: #4a5568;
    line-height: 1.6;
    font-size: 1rem;
}

/* Formula Box */
.formula-box {
    background: #f7fafc;
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #48bb78;
}

.formula-box code {
    color: #2d3748;
    font-weight: 600;
    font-family: monospace;
}

/* --- Media Queries (For Mobile) --- */
@media (max-width: 768px) {
    .calcpro-info-container {
        grid-template-columns: 1fr; /* Mobile par ek ke niche ek aayenge */
        padding: 20px;
    }
    
    .card-header h2 {
        font-size: 1.2rem;
    }
}

/* --- Dark Mode Support --- */
/* Ye tab kaam karega jab aapki body par .dark class hogi ya system dark mode hoga */
@media (prefers-color-scheme: dark) {
    .info-card {
        background: #1a202c;
        border-color: #2d3748;
    }
    .card-header h2 { color: #f7fafc; }
    .info-card p { color: #a0aec0; }
    .formula-box { background: #2d3748; }
    .formula-box code { color: #f7fafc; }
}

/* Agar aap manually .dark-mode class add karte hain to: */
body.dark-mode .info-card {
    background: #1a202c;
    border-color: #2d3748;
}
body.dark-mode .card-header h2 { color: #f7fafc; }
body.dark-mode .info-card p { color: #a0aec0; }
body.dark-mode .formula-box { background: #2d3748; }




/* Source Style for Text Clarity */
.calcpro-info-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
}

.info-card {
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: left;
}

/* Text Sharpness Fix */
.info-card p, .info-card li {
    color: #2d3748;
    font-size: 1.05rem;
    line-height: 1.8;
    text-rendering: optimizeLegibility; /* Blur hatane ke liye */
}

.card-header h2 {
    color: #1a202c;
    border-bottom: 2px solid #48bb78;
    padding-bottom: 10px;
}

/* Dark Mode Fix for Clear Text */
@media (prefers-color-scheme: dark) {
    .info-card {
        background: #1a202c;
        border-color: #2d3748;
    }
    .info-card p, .info-card li {
        color: #cbd5e0 !important; /* Sharp Light Grey */
    }
    .card-header h2 {
        color: #ffffff !important;
    }
}
