/* ============================================
   CUSTOM STYLES FOR TUTORPILOT
   ============================================ */

:root {
    /* Dark Theme (Default) */
    --primary: #6C47FF;
    --primary-dark: #4A2FA0;
    --secondary: #8B6FFF;
    --accent: #00D9FF;
    --background: #0F0F1A;
    --card-bg: #1A1A2E;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --border-color: rgba(108, 71, 255, 0.2);
    --glass: rgba(255, 255, 255, 0.05);
    --glass-hover: rgba(255, 255, 255, 0.08);
}

/* Light Theme */
body.light-theme {
    --primary: #5D3FD3;
    --primary-dark: #4A2FA0;
    --secondary: #7B5FD9;
    --accent: #0077BE;
    --background: #FFFFFF;
    --card-bg: #F5F5F7;
    --text-primary: #1F1F1F;
    --text-secondary: #666666;
    --border-color: rgba(93, 63, 211, 0.2);
    --glass: rgba(0, 0, 0, 0.03);
    --glass-hover: rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    background-color: var(--background);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light theme background gradient */
body.light-theme {
    background: linear-gradient(135deg, #FFFFFF 0%, #F5F5F7 50%, #E8E8F0 100%);
}

/* ============================================
   GLASS MORPHISM CARDS
   ============================================ */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

body.light-theme .glass-card {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.glass-card:hover {
    background: var(--glass-hover);
    border-color: rgba(108, 71, 255, 0.5);
    box-shadow: 0 8px 32px rgba(108, 71, 255, 0.2);
    transform: translateY(-4px);
}

body.light-theme .glass-card:hover {
    border-color: rgba(93, 63, 211, 0.5);
    box-shadow: 0 8px 32px rgba(93, 63, 211, 0.15);
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Blob Animation */
@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(50px, 50px) scale(1.05);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* Glow Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(108, 71, 255, 0.5), 0 0 20px rgba(108, 71, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(108, 71, 255, 0.8), 0 0 30px rgba(108, 71, 255, 0.6);
    }
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse-scale {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.animate-pulse-scale {
    animation: pulse-scale 2s ease-in-out infinite;
}

/* Slide In From Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

/* Slide In From Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* ============================================
   PHONE MOCKUP
   ============================================ */
.phone-mockup {
    position: relative;
    filter: drop-shadow(0 15px 45px rgba(108, 71, 255, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

.phone-mockup img {
    display: block;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.25);
}

/* ============================================
   GRADIENT TEXT
   ============================================ */
.gradient-text {
    background: linear-gradient(135deg, #6C47FF 0%, #00D9FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   BUTTON STYLES
   ============================================ */
button, a.btn-primary {
    position: relative;
    overflow: hidden;
}

button::before, a.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.3s ease;
}

button:hover::before, a.btn-primary:hover::before {
    left: 100%;
}

/* ============================================
   NAVBAR SCROLL EFFECT
   ============================================ */
#navbar.scrolled {
    background: rgba(15, 15, 26, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(108, 71, 255, 0.2);
}

/* ============================================
   TESTIMONIAL CARDS
   ============================================ */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(108, 71, 255, 0.3);
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-item {
    transition: all 0.3s ease;
}

.faq-item.active p {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   GRADIENT BORDERS
   ============================================ */
.border-gradient {
    position: relative;
    background: linear-gradient(rgba(15, 15, 26, 1), rgba(15, 15, 26, 1)) padding-box,
                linear-gradient(90deg, #6C47FF, #00D9FF) border-box;
    border: 2px solid transparent;
}

/* ============================================
   HOVER EFFECTS
   ============================================ */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(108, 71, 255, 0.3);
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

body.light-theme::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

/* ============================================
   NAVBAR STYLING
   ============================================ */
#navbar {
    background: transparent;
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background: rgba(15, 15, 26, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
}

body.light-theme #navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ============================================
   INPUT STYLES
   ============================================ */
input, textarea, select {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    transition: all 0.3s ease !important;
}

input:focus, textarea:focus, select:focus {
    background: var(--glass-hover) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(108, 71, 255, 0.1) !important;
}

input::placeholder, textarea::placeholder {
    color: var(--text-secondary) !important;
}

body.light-theme input::placeholder,
body.light-theme textarea::placeholder {
    color: var(--text-secondary) !important;
}

/* ============================================
   TEXT AND HEADING STYLES
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    transition: color 0.3s ease;
}

p, span, a {
    transition: color 0.3s ease;
}

/* ============================================
   BUTTON STYLES
   ============================================ */
button {
    transition: all 0.3s ease;
}

/* ============================================
   BORDER AND LINE STYLES
   ============================================ */
hr, .border-b, .border-t, .border-l, .border-r,
.border {
    border-color: var(--border-color) !important;
}

/* ============================================
   SECTION TRANSITIONS
   ============================================ */
section {
    transition: all 0.3s ease;
}

/* ============================================
   LOADING ANIMATION
   ============================================ */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .phone-mockup {
        display: none;
    }

    .glass-card {
        backdrop-filter: blur(10px);
    }

    button {
        font-size: 16px;
        padding: 12px 20px;
    }
}

/* ============================================
   DARK MODE (Already Applied by Default)
   ============================================ */
@media (prefers-color-scheme: dark) {
    .glass-card {
        background: rgba(255, 255, 255, 0.03);
    }
}

/* ============================================
   TRANSITION UTILITY
   ============================================ */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* ============================================
   BACKDROP BLUR
   ============================================ */
.backdrop-blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.backdrop-blur-lg {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* ============================================
   TRANSFORM UTILITIES
   ============================================ */
.scale-95 {
    transform: scale(0.95);
}

.scale-100 {
    transform: scale(1);
}

.scale-105 {
    transform: scale(1.05);
}

/* ============================================
   SHADOW UTILITIES
   ============================================ */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.shadow-purple-glow {
    box-shadow: 0 0 20px rgba(108, 71, 255, 0.4);
}

/* ============================================
   FEATURE CARD ANIMATION
   ============================================ */
.feature-card {
    opacity: 0;
    animation: slideInUp 0.6s ease-out forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

/* ============================================
   LINK HOVER EFFECTS
   ============================================ */
a {
    position: relative;
    text-decoration: none;
    color: var(--text-primary);
}

a.hover-underline {
    position: relative;
}

a.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

a.hover-underline:hover::after {
    width: 100%;
}

/* ============================================
   BADGE STYLES
   ============================================ */
.badge-new {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent) 0%, #1E90FF 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-popular {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   TESTIMONIAL CARDS
   ============================================ */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(108, 71, 255, 0.3);
}

body.light-theme .testimonial-card:hover {
    box-shadow: 0 20px 40px rgba(93, 63, 211, 0.2);
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-item {
    transition: all 0.3s ease;
}

.faq-item.active p {
    display: block;
    animation: slideDown 0.3s ease-out;
}

/* ============================================
   GRADIENT TEXT
   ============================================ */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-theme .gradient-text {
    -webkit-text-fill-color: transparent;
}

/* ============================================
   INPUT STYLES
   ============================================ */
input, textarea, select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(108, 71, 255, 0.2) !important;
    color: white !important;
    transition: all 0.3s ease !important;
}

input:focus, textarea:focus, select:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(108, 71, 255, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(108, 71, 255, 0.1) !important;
}

input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* ============================================
   LINK HOVER EFFECTS
   ============================================ */
a {
    position: relative;
    text-decoration: none;
}

a.hover-underline {
    position: relative;
}

a.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6C47FF, #00D9FF);
    transition: width 0.3s ease;
}

a.hover-underline:hover::after {
    width: 100%;
}

/* ============================================
   THEME BUTTON STYLING
   ============================================ */
#theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    cursor: pointer;
}

#theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

body.light-theme #theme-toggle {
    background: rgba(93, 63, 211, 0.1);
    border: 1px solid rgba(93, 63, 211, 0.2);
}

body.light-theme #theme-toggle:hover {
    background: rgba(93, 63, 211, 0.15);
    border-color: rgba(93, 63, 211, 0.3);
}

/* ============================================
   ANIMATION BACKGROUNDS
   ============================================ */
.animate-blob {
    animation: blob 7s infinite;
}

body.light-theme .animate-blob {
    opacity: 0.1 !important;
}

/* ============================================
   GRID ANIMATIONS
   ============================================ */
.grid-item {
    opacity: 0;
    animation: fadeInScale 0.6s ease-out forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.grid-item:nth-child(1) { animation-delay: 0.1s; }
.grid-item:nth-child(2) { animation-delay: 0.2s; }
.grid-item:nth-child(3) { animation-delay: 0.3s; }
.grid-item:nth-child(4) { animation-delay: 0.4s; }
.grid-item:nth-child(5) { animation-delay: 0.5s; }
.grid-item:nth-child(6) { animation-delay: 0.6s; }

/* ============================================
   MODAL ANIMATIONS
   ============================================ */
@keyframes modalFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content {
    animation: modalFadeIn 0.3s ease-out;
}

/* ============================================
   THEME-SPECIFIC ICON COLORS
   ============================================ */
body.light-theme .fa-check {
    color: #22c55e;
}

body.light-theme .fa-times {
    color: #ef4444;
}

body.light-theme .fa-star {
    color: #eab308;
}

body.light-theme .fa-exclamation-circle {
    color: #f97316;
}

/* ============================================
   FEATURE CARDS IN LIGHT MODE
   ============================================ */
body.light-theme .feature-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(93, 63, 211, 0.15);
}

body.light-theme .feature-card:hover {
    background: rgba(245, 245, 247, 0.9);
    box-shadow: 0 10px 30px rgba(93, 63, 211, 0.1);
}

/* ============================================
   STATS CARDS IN LIGHT MODE
   ============================================ */
body.light-theme [class*="stat"] {
    background: rgba(255, 255, 255, 0.6);
}

/* ============================================
   FOOTER IN LIGHT MODE
   ============================================ */
body.light-theme footer {
    background: rgba(245, 245, 247, 0.8);
    border-color: var(--border-color);
}

/* ============================================
   SECTION BACKGROUNDS
   ============================================ */
body.light-theme section {
    background: linear-gradient(180deg, transparent 0%, rgba(93, 63, 211, 0.02) 100%);
}

/* ============================================
   TEXT COLOR ADJUSTMENTS
   ============================================ */
body.light-theme .text-gray-300 {
    color: #666666 !important;
}

body.light-theme .text-gray-400 {
    color: #999999 !important;
}

body.light-theme .text-gray-500 {
    color: #aaaaaa !important;
}

/* ============================================
   LINK COLORS IN LIGHT MODE
   ============================================ */
body.light-theme a:not([class*="btn"]):not([class*="link"]) {
    color: var(--primary);
}

body.light-theme a:hover:not([class*="btn"]):not([class*="link"]) {
    color: #4A2FA0;
}
