/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables for Green Theme */
:root {
    --primary-green: #10b981;
    --secondary-green: #059669;
    --light-green: #d1fae5;
    --dark-green: #047857;
    --emerald: #34d399;
    --sage: #6b7280;
    --mint: #f0fdf4;
    --forest: #064e3b;
    --gradient-primary: linear-gradient(135deg, #10b981, #059669);
    --gradient-secondary: linear-gradient(135deg, #34d399, #10b981);
    --gradient-accent: linear-gradient(135deg, #d1fae5, #a7f3d0);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-soft: 0 4px 20px rgba(16, 185, 129, 0.1);
    --shadow-medium: 0 8px 30px rgba(16, 185, 129, 0.15);
    --shadow-strong: 0 12px 40px rgba(16, 185, 129, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #d1fae5 100%);
    min-height: 100vh;
    color: #1f2937;
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(52, 211, 153, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(167, 243, 208, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Card Styles */
.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(16, 185, 129, 0.3);
}

.card-header {
    background: var(--gradient-accent);
    border-radius: 20px 20px 0 0 !important;
    padding: 20px 30px;
    font-weight: 600;
    color: var(--dark-green);
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30px;
    right: 30px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-green), transparent);
}

.card-body {
    padding: 30px;
    position: relative;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--dark-green);
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand i {
    color: var(--primary-green);
    font-size: 1.6rem;
}

.nav-link {
    font-weight: 500;
    padding: 10px 20px !important;
    color: var(--sage);
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-green);
    background: rgba(16, 185, 129, 0.1);
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--primary-green);
    background: var(--light-green);
}

/* Form Styles */
.form-control {
    padding: 15px 20px;
    border-radius: 12px;
    border: 2px solid rgba(16, 185, 129, 0.1);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    font-weight: 400;
}

.form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    background: rgba(255, 255, 255, 0.95);
    outline: none;
}

.form-control::placeholder {
    color: var(--sage);
}

.form-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark-green);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Button Styles */
.btn {
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    background: var(--gradient-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-lg {
    padding: 18px 40px;
    font-size: 1.1rem;
    border-radius: 15px;
}

/* Result Styles */
.result-card {
    background: var(--gradient-accent);
    border-radius: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(16, 185, 129, 0.1);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(16, 185, 129, 0.05), transparent);
    animation: rotate 20s linear infinite;
}

.score-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.score-circle::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    z-index: -1;
}

.score-circle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-strong);
}

.score-value {
    font-size: 2.8rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.recommendation-text {
    font-weight: 600;
    padding: 12px 25px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark-green);
    margin-top: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.2);
    z-index: 1;
    position: relative;
}

/* Table Styles */
.table {
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    overflow: hidden;
}

.table th {
    font-weight: 600;
    background: var(--gradient-accent);
    color: var(--dark-green);
    border: none;
    padding: 20px 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.table td {
    padding: 15px;
    border-color: rgba(16, 185, 129, 0.1);
    vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(16, 185, 129, 0.03);
}

.table-hover tbody tr:hover {
    background-color: rgba(16, 185, 129, 0.08);
    transform: scale(1.01);
    transition: var(--transition);
}

/* Accordion Styles */
.accordion-button {
    font-weight: 600;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 15px;
    color: var(--dark-green);
}

.accordion-button:not(.collapsed) {
    background: var(--gradient-accent);
    color: var(--dark-green);
    box-shadow: none;
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23059669'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-body {
    padding: 25px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 0 15px 15px;
}

/* Badge Styles */
.badge {
    padding: 8px 16px;
    font-weight: 500;
    border-radius: 25px;
    font-size: 0.85rem;
    background: var(--gradient-primary);
    color: white;
    border: 1px solid rgba(16, 185, 129, 0.2);
    backdrop-filter: blur(10px);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animated-title span {
    display: inline-block;
    animation: fadeIn 1s ease forwards;
}

/* Color Classes for Recommendations */
.bg-recommendation-0 {
    background: linear-gradient(135deg, #fca5a5, #f87171) !important;
}

.bg-recommendation-1 {
    background: linear-gradient(135deg, #fcd34d, #f59e0b) !important;
}

.bg-recommendation-2 {
    background: linear-gradient(135deg, #34d399, #10b981) !important;
}

/* Animation for Score Display */
@keyframes scoreProgress {
    from { 
        transform: scale(0.8) rotate(-10deg);
        opacity: 0;
    }
    to { 
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.score-circle {
    animation: scoreProgress 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 25px 20px;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    .score-value {
        font-size: 2.2rem;
    }
    
    .btn {
        padding: 12px 25px;
    }
}

@media (max-width: 576px) {
    .card-header {
        padding: 15px 20px;
    }
    
    .btn-lg {
        padding: 15px 30px;
        font-size: 1rem;
    }
    
    .form-control {
        padding: 12px 15px;
    }
}

/* Print Specific Styles */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }
    
    body::before {
        display: none;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        background: white !important;
    }
    
    .btn, .navbar, .footer {
        display: none !important;
    }
    
    a {
        text-decoration: none !important;
        color: black !important;
    }
}

/* Custom Utility Classes */
.text-muted {
    color: var(--sage) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-soft) !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

/* Additional Modern Elements */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.floating-element {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
    z-index: 1000;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-green);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.recommendation-text {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
}

.table-responsive {
    overflow-x: auto;
}

.card {
    margin-bottom: 20px;
    border-radius: 10px;
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
}