/*
Theme Name: Credit Card Calculator Pro
Theme URI: https://example.com
Author: Financial Tools Team
Author URI: https://example.com
Description: Advanced credit card minimum due calculator with bank rates and card offers
Version: 3.0
Text Domain: cc-calculator
*/

:root {
    --primary: #1a237e;
    --primary-light: #303f9f;
    --secondary: #3949ab;
    --accent: #ff4081;
    --accent-dark: #e91e63;
    --light: #e8eaf6;
    --dark: #0d0f36;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --gold: #FFD700;
    --silver: #C0C0C0;
    --platinum: #E5E4E2;
    --text: #333;
    --text-light: #666;
    --background: #f8f9fe;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: var(--text);
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 30px 0;
    color: white;
    position: relative;
}

.logo {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: var(--gold);
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 30px;
    margin: 5px;
}

.tab-btn.active {
    background: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.calculator-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 30px 0;
}

.calculator-form {
    flex: 1;
    min-width: 350px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.calculator-results {
    flex: 1;
    min-width: 350px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(57, 73, 171, 0.2);
}

.btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 64, 129, 0.4);
}

.btn-reset {
    background: #9e9e9e;
}

.btn-reset:hover {
    background: #757575;
}

.result-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-left: 5px solid var(--secondary);
}

.result-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dark);
    margin: 10px 0;
}

.result-value.interest {
    color: var(--danger);
}

.result-value.saved {
    color: var(--success);
}

.scrolling-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.scrolling-header {
    background: var(--primary);
    color: white;
    padding: 15px 25px;
    font-size: 1.4rem;
    font-weight: 600;
}

.scrolling-content {
    padding: 20px 0;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.scrolling-wrapper {
    display: flex;
    width: max-content;
    animation: scrollRight 30s linear infinite;
}

.scrolling-wrapper.cards {
    animation: scrollLeft 25s linear infinite;
}

.bank-item, .card-item {
    padding: 15px 30px;
    min-width: 200px;
    text-align: center;
    border-right: 1px solid #eee;
    transition: all 0.3s;
}

.bank-item:hover, .card-item:hover {
    background: var(--light);
    transform: translateY(-5px);
}

.bank-name {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 5px;
}

.bank-rate {
    color: var(--danger);
    font-weight: 600;
}

.card-item {
    min-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-name {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
    text-align: center;
}

.card-benefits {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    min-height: 40px;
    text-align: center;
}

.apply-btn {
    padding: 10px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.apply-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 64, 129, 0.4);
}

.tips-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.tips-section h2 {
    color: var(--primary);
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tip-card {
    background: var(--light);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
    border-left: 4px solid var(--primary);
}

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

.tip-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tip-card h3 i {
    color: var(--accent);
}

.cibil-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.cibil-section h2 {
    color: var(--primary);
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cibil-impact {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.impact-card {
    flex: 1;
    min-width: 250px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 2px solid #eee;
    transition: all 0.3s;
}

.impact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.impact-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.impact-card.negative {
    border-color: #ffcdd2;
}

.impact-card.positive {
    border-color: #c8e6c9;
}

.disclaimer {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    margin-top: 40px;
    font-size: 0.9rem;
    color: #666;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.disclaimer a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

.disclaimer a:hover {
    text-decoration: underline;
}

@keyframes scrollRight {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scrollLeft {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

@media (max-width: 768px) {
    .calculator-container {
        flex-direction: column;
    }
    
    .calculator-form, .calculator-results {
        min-width: 100%;
    }
    
    .result-value {
        font-size: 1.8rem;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    .logo {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 15px;
    }
    
    .scrolling-wrapper, .scrolling-wrapper.cards {
        animation-duration: 40s;
    }
}


/* CardReferral Popup */
#cardReferralPopup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.popup-content {
    position: relative;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    padding: 40px;
    border-radius: 25px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease-out;
    border: 5px solid #FF6B6B;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #FF6B6B;
    font-weight: bold;
    transition: all 0.3s;
}

.popup-close:hover {
    background: white;
    transform: rotate(90deg);
}

.popup-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out infinite;
}

.popup-content h3 {
    color: #1a237e;
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 800;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.popup-content p {
    color: #2d3436;
    font-size: 1.2rem;
    margin-bottom: 25px;
    font-weight: 600;
}

.popup-benefits {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    margin: 25px 0;
}

.benefit-item {
    color: #1a237e;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 10px 0;
}

.popup-button {
    display: inline-block;
    background: #FF6B6B;
    color: white;
    padding: 18px 50px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 900;
    font-size: 1.3rem;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.6);
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: buttonPulse 2s ease-in-out infinite;
}

.popup-button:hover {
    background: #FF8E53;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.8);
}

.popup-subtext {
    color: #666;
    font-size: 0.9rem;
    margin-top: 15px;
    font-weight: 600;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes buttonPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@media (max-width: 768px) {
    .popup-content {
        padding: 30px 20px;
        max-width: 90%;
    }
    
    .popup-content h3 {
        font-size: 1.6rem;
    }
    
    .popup-button {
        padding: 15px 35px;
        font-size: 1.1rem;
    }
}
