/* ===== CSS VARIABLES ===== */
:root {
    --primary-navy: #0A192F;
    --primary-teal: #00C9A7;
    --primary-indigo: #4F46E5;
    --bg-light: #F9FAFB;
    --bg-dark: #1a1a2e;
    --text-dark: #2D3748;
    --text-light: #E2E8F0;
    --error-red: #EF4444;
    --warning-orange: #F59E0B;
    --success-green: #10B981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body.dark-mode {
    --bg-light: #1a1a2e;
    --text-dark: #E2E8F0;
    --primary-navy: #0f172a;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

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

/* ===== PARTICLE BACKGROUND ===== */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-navy) 0%, #1e3a5f 100%);
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s infinite;
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-indigo));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: var(--transition);
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.scroll-top.show {
    display: flex;
}

/* ===== DARK MODE TOGGLE ===== */
.dark-mode-toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 20px;
    z-index: 1000;
    transition: var(--transition);
}

.dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(20deg);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 20px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-navy) 0%, #1e3a5f 50%, #2a5298 100%);
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-indigo));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.8;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 40px;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-indigo));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 201, 167, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 201, 167, 0.4);
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 60px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-item i {
    font-size: 2.5rem;
    color: var(--primary-teal);
}

.stat-content h3 {
    font-size: 2rem;
    color: white;
    font-weight: 700;
}

.stat-content p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.hero-graphic {
    flex: 1;
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 30px;
    border-radius: 15px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    box-shadow: var(--shadow-xl);
}

.floating-card i {
    font-size: 1.5rem;
    color: var(--primary-teal);
}

.card-1 {
    top: 10%;
    left: 20%;
    animation: float 6s ease-in-out infinite;
}

.card-2 {
    top: 50%;
    right: 10%;
    animation: float 7s ease-in-out infinite 1s;
}

.card-3 {
    bottom: 15%;
    left: 30%;
    animation: float 8s ease-in-out infinite 2s;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #64748B;
}

/* ===== FORM SECTION ===== */
.form-section {
    padding: 100px 20px;
    background: var(--bg-light);
}

.form-card {
    background: linear-gradient(135deg, rgba(0, 132, 255, 0.15) 0%, rgba(0, 212, 255, 0.1) 50%, rgba(102, 126, 234, 0.15) 100%);
    padding: 50px;
    border-radius: 20px;
    max-width: 900px;
    margin: 0 auto;
    border: 2px solid rgba(0, 132, 255, 0.4);
    position: relative;
    backdrop-filter: blur(10px);
}

.form-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #0084ff, #00d4ff, #667eea);
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}

.form-card:hover::before {
    opacity: 0.2;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.form-group label i {
    color: #0084ff;
}

.form-group input,
.form-group select {
    padding: 15px 20px;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #0084ff;
    box-shadow: 0 0 0 3px rgba(0, 132, 255, 0.2);
}

.hint-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

.error-message {
    color: var(--error-red);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.calculate-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-indigo));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 20px;
}

.calculate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.3);
}

.calculate-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== RESULTS SECTION ===== */
.results-section {
    padding: 100px 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.score-card,
.suggestions-card,
.breakdown-card,
.summary-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    transition: var(--transition);
}

.score-card:hover,
.suggestions-card:hover,
.breakdown-card:hover,
.summary-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 132, 255, 0.3);
}

.score-card {
    grid-column: 1 / -1;
    text-align: center;
}

.score-card h3,
.suggestions-card h3,
.breakdown-card h3,
.summary-card h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: white;
}

.score-meter {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 30px auto;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

#scoreNumber {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-indigo));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#scoreRating {
    font-size: 1.2rem;
    color: white;
    font-weight: 600;
}

.score-range {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.range-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.range-color {
    width: 40px;
    height: 8px;
    border-radius: 5px;
}

.poor .range-color {
    background: var(--error-red);
}

.fair .range-color {
    background: var(--warning-orange);
}

.good .range-color {
    background: #3B82F6;
}

.excellent .range-color {
    background: var(--success-green);
}

.range-item span:not(.range-color) {
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.range-item small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

#suggestions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.suggestion-item {
    display: flex;
    align-items: start;
    gap: 15px;
    padding: 15px;
    background: #0d3a4f;
    border: 1px solid rgba(0, 132, 255, 0.2);
    border-radius: 10px;
    border-left: 4px solid #0084ff;
}

.suggestion-item i {
    color: #0084ff;
    font-size: 1.3rem;
    margin-top: 2px;
}

.suggestion-content h5 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: white;
}

.suggestion-content p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

#userSummary {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #0d3a4f;
    border: 1px solid rgba(0, 132, 255, 0.2);
    border-radius: 10px;
}

.summary-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.summary-value {
    font-weight: 600;
    color: white;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn.recalculate {
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-indigo));
    color: white;
}

.action-btn.download {
    background: #3B82F6;
    color: white;
}

.action-btn.history {
    background: #8B5CF6;
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== TIPS SECTION ===== */
.tips-section {
    padding: 100px 20px;
    background: var(--bg-light);
}

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

.tip-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
}

.tip-card:hover {
    transform: translateY(-10px) rotateY(5deg);
    box-shadow: var(--shadow-xl);
}

.tip-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-indigo));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.tip-icon i {
    font-size: 1.8rem;
    color: white;
}

.tip-card h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.tip-card p {
    color: #64748B;
    line-height: 1.7;
    margin-bottom: 15px;
}

.tip-impact {
    display: flex;
    align-items: center;
    gap: 10px;
}

.impact-label {
    font-size: 0.85rem;
    color: #64748B;
    font-weight: 600;
}

.impact-bar {
    flex: 1;
    height: 8px;
    background: #E2E8F0;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.impact-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 5px;
}

.impact-bar.high::after {
    width: 90%;
    background: var(--success-green);
}

.impact-bar.medium::after {
    width: 60%;
    background: var(--warning-orange);
}

.impact-bar.low::after {
    width: 30%;
    background: #3B82F6;
}

.chart-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.chart-container h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: var(--text-dark);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #E2E8F0;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: #F1F5F9;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-dark);
    transition: var(--transition);
}

.modal-close:hover {
    background: #E2E8F0;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.history-item {
    background: #F0F9FF;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-indigo);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-score {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-indigo);
}

.history-date {
    font-size: 0.85rem;
    color: #64748B;
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(135deg, var(--primary-navy) 0%, #1e3a5f 100%);
    color: white;
    padding: 60px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-teal);
}

.footer-section p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-teal);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--primary-teal);
    transform: translateY(-3px);
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
}

.contact-info i {
    color: var(--primary-teal);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: var(--text-light);
    margin-bottom: 10px;
}

.footer-bottom i.fa-heart {
    color: var(--error-red);
    animation: heartbeat 1.5s ease infinite;
}

/* ===== FEATURES SECTION ===== */
.features-section {
    padding: 100px 20px;
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-indigo));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.feature-icon i {
    font-size: 2.2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.feature-card p {
    color: #64748B;
    line-height: 1.7;
}

.cta-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(0, 201, 167, 0.1), rgba(79, 70, 229, 0.1));
    border-radius: 20px;
}

.cta-section h3 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.cta-button.secondary {
    background: linear-gradient(135deg, var(--primary-indigo), #8B5CF6);
}

/* ===== CONFETTI ===== */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-teal);
    animation: confettiFall 3s linear forwards;
}
