/* Global Styles */
:root {
    --primary-color: #6C63FF;
    --secondary-color: #FF6584;
    --tertiary-color: #43CBFF;
    --dark-color: #2A2A3C;
    --light-color: #F8F9FA;
    --gray-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--tertiary-color) 100%);
    --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    
    /* LifeCalc Theme Colors */
    --theme-blue: #6c5ce7;
    --theme-purple: #a29bfe;
    --theme-pink: #fd79a8;
    --theme-green: #00b894;
    --theme-yellow: #fdcb6e;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Add padding for fixed header */
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 20px;
}

p {
    margin-bottom: 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--tertiary-color);
}

ul {
    list-style-type: none;
}

img {
    max-width: 100%;
    height: auto;
}

section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--gray-color);
    max-width: 700px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.primary-btn {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
}

.primary-btn:hover {
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.6);
    transform: translateY(-2px);
    color: white;
}

.calculate-btn {
    font-size: 1.1rem;
    padding: 14px 32px;
    margin-top: 10px;
    transition: all 0.4s ease;
}

.calculate-btn i {
    margin-right: 8px;
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.7);
}

.secondary-btn {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0;
    margin-right: 40px;
}

.logo span {
    color: var(--primary-color);
}

nav ul {
    display: flex;
    gap: 30px;
}

nav ul li {
    margin-left: 0;
}

nav ul li a {
    color: var(--dark-color);
    font-weight: 500;
    position: relative;
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover:after {
    width: 100%;
}

/* Calculator Section */
.calculator-section {
    background-color: white;
    border-radius: 20px;
    margin-top: 30px;
    margin-bottom: 50px;
    box-shadow: var(--box-shadow);
    padding: 70px 40px;
    position: relative;
    scroll-margin-top: 100px; /* Additional scroll margin for this section */
}

.calculator-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    align-items: flex-start;
}

.input-container {
    flex: 1;
    min-width: 300px;
}

.results-container {
    flex: 2;
    min-width: 300px;
    background-color: transparent;
    border-radius: 0;
    padding: 30px;
    box-shadow: none;
    min-height: 400px;
    position: relative;
}

.results-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--gray-color);
}

.results-placeholder .results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.9;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    display: inline-block;
}

.results-placeholder img {
    max-width: 300px;
    margin-bottom: 20px;
    opacity: 0.7;
}

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

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

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.stat-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    position: relative;
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--gradient-primary);
}

.stat-icon {
    margin-bottom: 15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary-color);
    font-size: 1.5rem;
}

.stat-title {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-detail {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-top: auto;
}

.share-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.share-btn:hover {
    color: var(--primary-color);
}

.template {
    display: none;
}

/* About Section */
.about-section {
    background-color: #f8f9fa;
    scroll-margin-top: 100px; /* Additional scroll margin for this section */
    padding: 80px 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.about-image img {
    max-width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* FAQ Section */
.faq-section {
    scroll-margin-top: 100px; /* Additional scroll margin for this section */
    padding: 80px 0;
}

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

.faq-item {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question h3 {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.faq-toggle {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 1000px; /* Large enough to fit any content */
    padding: 0 20px 20px;
    transition: max-height 0.5s ease-in-out, padding 0.3s ease;
}

/* Footer */
.footer-wrapper {
    background-color: var(--dark-color);
    color: white;
    padding-top: 20px;
    width: 100%;
}

footer {
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.footer-content {
    display: flex;
    justify-content: center;
    padding: 0 20px;
    margin-bottom: 10px;
}

.footer-logo h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    text-align: center;
}

.footer-logo span {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding: 10px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #adb5bd;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
    animation: modalFadeIn 0.3s;
}

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

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray-color);
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--dark-color);
}

#share-text {
    text-align: center;
    padding: 15px;
    border-radius: var(--border-radius);
    background-color: var(--light-color);
    margin: 20px 0;
}

.share-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.share-option {
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.twitter {
    background-color: #000000;
    color: white;
}

.twitter svg {
    fill: white;
}

.facebook {
    background-color: #4267B2;
    color: white;
}

.facebook svg {
    fill: white;
}

.copy {
    background-color: white;
    color: var(--dark-color);
    border: 1px solid var(--gray-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .calculator-container {
        flex-direction: column;
        align-items: center;
    }
    
    .input-container {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    #stats-form {
        width: 100%;
        max-width: 500px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .form-group {
        width: 100%;
    }
    
    .btn.primary-btn {
        margin: 0 auto;
        display: block;
    }
    
    .results-container {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .stats-grid {
        width: 100%;
        justify-content: center;
    }
    
    .about-content {
        flex-direction: column-reverse;
        gap: 30px;
        text-align: center;
    }
    
    .about-image {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .about-text {
        width: 100%;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 15px 0;
        align-items: center;
    }
    
    .logo {
        display: flex;
        justify-content: center;
        width: 100%;
        text-align: center;
        margin: 0 auto;
    }
    
    .logo a {
        display: flex;
        justify-content: center;
        width: 100%;
        margin: 0 auto;
    }
    
    .logo h1 {
        display: block;
        text-align: center;
        margin: 0 auto;
        padding: 0;
    }
    
    nav ul {
        margin-top: 15px;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .about-section {
        padding: 50px 20px;
    }
    
    .about-content {
        gap: 25px;
    }
    
    .about-text p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 15px;
    }
    
    .about-image {
        max-width: 320px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 20px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .about-section {
        padding: 40px 15px;
    }
    
    .about-content {
        gap: 20px;
    }
    
    .about-image {
        max-width: 280px;
    }
    
    .about-text p {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 20px;
    }
    
    .results-placeholder .results-icon {
        font-size: 3rem;
    }
}

/* Animation */
.animate-fade-in {
    animation: fadeIn 1s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.6s ease forwards;
}

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

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