@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary: #7C3AED;
    --primary-light: #8B5CF6;
    --secondary: #EC4899;
    --background: #F8FAFC;
    --text: #1E293B;
    --gradient: linear-gradient(135deg, #7C3AED 0%, #EC4899 100%);
    --card-shadow: 0 10px 30px rgba(124, 58, 237, 0.1);
    --hover-shadow: 0 20px 40px rgba(124, 58, 237, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 20px;
    flex: 1;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.header h1 {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #64748B;
    font-size: 1.1rem;
}

.form-section {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.form-section:hover {
    box-shadow: var(--hover-shadow);
    transform: translateY(-5px);
}

.form-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #E2E8F0;
}

.form-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
}

.form-group label i {
    color: var(--primary);
}

.form-select, .form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-select:focus, .form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.calculate-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.2);
}

.result-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.result-header {
    background: var(--gradient);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.result-body {
    padding: 1.5rem;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 2px solid #E2E8F0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.result-label {
    color: #64748B;
    font-size: 0.9rem;
}

.result-value {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.footer {
    text-align: center;
    padding: 1rem;
    color: #64748B;
}

.footer i {
    color: var(--secondary);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Loading overlay styles */
.loading-overlay {
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(5px);
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #E2E8F0;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error message styles */
.error-message {
    background: #FEE2E2;
    color: #DC2626;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    animation: shake 0.5s ease-in-out;
}

.error-field {
    border-color: #DC2626 !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Navbar styles */
.navbar {
    background: white;
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.calculator-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
}

.nav-link:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.2);
}

.nav-link.active {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.2);
}

.nav-link i {
    font-size: 1.2rem;
}

/* Remove the absolute positioning */
.nav-link[href="https://satty0104.github.io/CalculateMyDahej/"] {
    position: static;
}

/* Adjust container margin for new navbar */
.container {
    margin-top: 2rem;
}

/* Media query for mobile responsiveness */
@media (max-width: 768px) {
    .container {
        margin: 1rem auto;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}
