/* Recall147 - Enhanced Visual Styles */

/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --secondary-light: #34d399;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --dark: #1e1b4b;
    --darker: #0f0d24;
    --light: #f8fafc;
    --gray: #64748b;
    --pink: #ec4899;
    --cyan: #06b6d4;
    --neural-1: rgba(99, 102, 241, 0.15);
    --neural-2: rgba(16, 185, 129, 0.15);
    --neural-3: rgba(236, 72, 153, 0.1);
}

/* Animated Gradient Background */
.gradient-bg {
    background: linear-gradient(-45deg, #1e1b4b, #312e81, #4c1d95, #1e1b4b);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Enhanced Neural Background */
.neural-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.neural-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 30%, var(--neural-1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, var(--neural-2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, var(--neural-3) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 40%);
    animation: neural-pulse 20s ease-in-out infinite;
}

@keyframes neural-pulse {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
    25% { transform: translate(2%, -2%) scale(1.02); opacity: 0.9; }
    50% { transform: translate(-1%, 1%) scale(0.98); opacity: 0.6; }
    75% { transform: translate(-2%, 2%) scale(1.01); opacity: 0.8; }
}

/* Floating Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
    border-radius: 50%;
    opacity: 0;
    animation: float-up 15s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 12s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 14s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 11s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1s; animation-duration: 16s; }
.particle:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 13s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; animation-duration: 15s; }
.particle:nth-child(7) { left: 70%; animation-delay: 2s; animation-duration: 12s; }
.particle:nth-child(8) { left: 80%; animation-delay: 4s; animation-duration: 14s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1s; animation-duration: 11s; }
.particle:nth-child(10) { left: 15%; animation-delay: 3s; animation-duration: 16s; }
.particle:nth-child(11) { left: 35%; animation-delay: 0s; animation-duration: 13s; }
.particle:nth-child(12) { left: 55%; animation-delay: 2s; animation-duration: 15s; }
.particle:nth-child(13) { left: 75%; animation-delay: 4s; animation-duration: 12s; }
.particle:nth-child(14) { left: 85%; animation-delay: 1s; animation-duration: 14s; }
.particle:nth-child(15) { left: 25%; animation-delay: 3s; animation-duration: 11s; }

@keyframes float-up {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

/* Neural nodes animation */
.neural-node {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-light);
    border-radius: 50%;
    opacity: 0;
    animation: node-appear 4s ease-in-out infinite;
    box-shadow: 0 0 10px var(--primary-light);
}

.neural-node:nth-child(1) { top: 20%; left: 30%; animation-delay: 0s; }
.neural-node:nth-child(2) { top: 60%; left: 70%; animation-delay: 1s; }
.neural-node:nth-child(3) { top: 40%; left: 50%; animation-delay: 2s; }
.neural-node:nth-child(4) { top: 80%; left: 20%; animation-delay: 3s; }
.neural-node:nth-child(5) { top: 30%; left: 80%; animation-delay: 0.5s; }

@keyframes node-appear {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 0.8; transform: scale(2.5); }
}

/* Glassmorphism Card */
.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 20px 40px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.card-dark {
    background: rgba(30, 27, 75, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: white;
}

.card-dark:hover {
    box-shadow:
        0 20px 40px rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Glowing Card Variant */
.card-glow {
    position: relative;
    overflow: hidden;
}

.card-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent,
        var(--primary-light),
        transparent,
        var(--secondary-light),
        transparent
    );
    animation: rotate-glow 6s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.card-glow:hover::before {
    opacity: 0.3;
}

@keyframes rotate-glow {
    100% { transform: rotate(360deg); }
}

/* Topic Card Enhanced */
.topic-card {
    position: relative;
    overflow: hidden;
}

.topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--secondary), var(--cyan));
    border-radius: 4px 0 0 4px;
}

.topic-card.due-now {
    animation: pulse-border 2s ease-in-out infinite;
}

.topic-card.due-now::before {
    background: linear-gradient(180deg, var(--accent), var(--pink), var(--accent));
    box-shadow: 0 0 20px var(--accent);
}

@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

/* Score indicators */
.score-1 { color: #ef4444; }
.score-2 { color: #f97316; }
.score-3 { color: #eab308; }
.score-4 { color: #84cc16; }
.score-5 { color: #22c55e; }

.score-bg-1 { background: linear-gradient(135deg, #fef2f2, #fee2e2); border: 2px solid #fecaca; }
.score-bg-2 { background: linear-gradient(135deg, #fff7ed, #ffedd5); border: 2px solid #fed7aa; }
.score-bg-3 { background: linear-gradient(135deg, #fefce8, #fef9c3); border: 2px solid #fef08a; }
.score-bg-4 { background: linear-gradient(135deg, #f7fee7, #ecfccb); border: 2px solid #bef264; }
.score-bg-5 { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border: 2px solid #86efac; }

/* Enhanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow:
        0 4px 15px rgba(99, 102, 241, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 25px rgba(99, 102, 241, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    border: 2px solid var(--primary);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.btn-google {
    background: white;
    color: #333;
    border: 1px solid #e5e7eb;
    gap: 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.btn-google:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.btn-ghost {
    background: transparent;
    color: var(--gray);
}

.btn-ghost:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

/* Score Button Enhanced */
.score-btn {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-weight: bold;
    font-size: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
}

.score-btn:hover {
    transform: scale(1.15) translateY(-2px);
}

.score-btn.selected {
    transform: scale(1.2);
    box-shadow:
        0 0 0 4px var(--primary),
        0 10px 20px rgba(99, 102, 241, 0.3);
}

/* Enhanced Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 13, 36, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

/* Enhanced Mentor Message */
.mentor-message {
    position: relative;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(16, 185, 129, 0.1));
    border-left: 4px solid;
    border-image: linear-gradient(180deg, var(--primary), var(--secondary)) 1;
    padding: 1.25rem 1.5rem;
    border-radius: 0 16px 16px 0;
    font-style: italic;
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.1);
}

.mentor-message::before {
    content: '"';
    position: absolute;
    top: -5px;
    left: 12px;
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.6;
    font-family: Georgia, serif;
}

/* Stats Card Enhanced */
.stat-card {
    text-align: center;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--cyan));
}

.stat-value {
    font-size: 2.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    color: var(--gray);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 220px;
    width: 100%;
}

/* Loading Spinner Enhanced */
.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Enhanced */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--dark);
    color: white;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: linear-gradient(135deg, var(--secondary), #059669);
}

.toast.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Input Styles Enhanced */
input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: white;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-animated {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--pink), var(--primary));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Hero Gradient */
.hero-gradient {
    background:
        radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.08) 0%, transparent 60%);
}

/* Section Divider */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-light), var(--secondary-light), transparent);
    margin: 4rem 0;
    opacity: 0.5;
}

/* Animated Border */
.animated-border {
    position: relative;
    background: white;
    border-radius: 20px;
}

.animated-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--pink), var(--cyan), var(--primary));
    background-size: 400% 400%;
    border-radius: 22px;
    z-index: -1;
    animation: border-animation 8s ease infinite;
}

@keyframes border-animation {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Feature Icon Container */
.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.feature-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, currentColor, transparent);
    opacity: 0.1;
}

.feature-icon svg {
    width: 36px;
    height: 36px;
    position: relative;
    z-index: 1;
}

/* Floating Animation */
.float {
    animation: floating 3s ease-in-out infinite;
}

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

/* Pulse Ring Animation */
.pulse-ring {
    position: relative;
}

.pulse-ring::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid var(--primary);
    border-radius: inherit;
    animation: pulse-ring-animation 2s ease-out infinite;
}

@keyframes pulse-ring-animation {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% { left: 100%; }
}

/* Header Glassmorphism */
.header-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

/* Footer Gradient */
.footer-gradient {
    background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.03), rgba(16, 185, 129, 0.03));
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .card {
        border-radius: 16px;
    }

    .btn {
        padding: 0.75rem 1.5rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .modal-content {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .feature-icon {
        width: 64px;
        height: 64px;
        border-radius: 18px;
    }

    .feature-icon svg {
        width: 28px;
        height: 28px;
    }
}

/* Focus States */
.btn:focus-visible,
.score-btn:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-light), var(--secondary-light));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

/* Selection Styling */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--dark);
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Glass Input */
.glass-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid rgba(229, 231, 235, 0.8);
    border-radius: 14px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.glass-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: rgba(255, 255, 255, 0.9);
}

.glass-input::placeholder {
    color: #9ca3af;
}

/* Button Glow Effect */
.btn-glow {
    box-shadow:
        0 4px 15px rgba(99, 102, 241, 0.3),
        0 0 0 0 rgba(99, 102, 241, 0.4);
    animation: btn-glow-pulse 2s ease-in-out infinite;
}

@keyframes btn-glow-pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3), 0 0 0 0 rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5), 0 0 20px rgba(99, 102, 241, 0.2); }
}

/* Slow Pulse Animation */
.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

@keyframes pulse-slow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* Float Animation */
.animate-float {
    animation: animate-float 4s ease-in-out infinite;
}

@keyframes animate-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Shimmer Animation */
.animate-shimmer {
    animation: animate-shimmer 3s ease-in-out infinite;
}

@keyframes animate-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Draw Animation for SVG Paths */
.animate-draw {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw-line 2s ease forwards;
}

@keyframes draw-line {
    to { stroke-dashoffset: 0; }
}

/* Transition utilities */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

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

.slide-in-left {
    animation: slideInLeft 0.6s ease forwards;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

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

.scale-in {
    animation: scaleIn 0.5s ease forwards;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
