/* =============================================
   Advanced UI Improvements
   Next-Level Design Elements
   ============================================= */

/* Modern Card Design with Depth */
.card, .book-card, .plan-card, .feature-card {
    position: relative;
    background: var(--white);
    border: 1px solid rgba(139, 92, 246, 0.1);
    backdrop-filter: blur(10px);
}

.card::after, .book-card::after, .plan-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card:hover::after, .book-card:hover::after, .plan-card:hover::after {
    opacity: 1;
}

/* Neumorphic Elements */
.neumorphic {
    background: #F9FAFB;
    box-shadow: 
        8px 8px 16px rgba(163, 177, 198, 0.4),
        -8px -8px 16px rgba(255, 255, 255, 0.8);
    border-radius: 20px;
}

.neumorphic:hover {
    box-shadow: 
        12px 12px 24px rgba(163, 177, 198, 0.5),
        -12px -12px 24px rgba(255, 255, 255, 0.9);
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Advanced Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #EC4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 9998;
}

.fab:hover {
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 12px 35px rgba(139, 92, 246, 0.6);
}

/* Advanced Typography */
.display-1 {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.display-2 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
}

.lead-text {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-gray);
    font-weight: 400;
}

/* Modern Badges */
.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    color: var(--accent-purple);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Advanced Button States */
.btn-advanced {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    border: none;
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-advanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-advanced:hover::before {
    left: 100%;
}

.btn-advanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.4);
}

.btn-advanced:active {
    transform: translateY(0);
}

/* Micro-interactions */
.interactive-element {
    transition: all 0.2s ease;
}

.interactive-element:hover {
    transform: scale(1.05);
}

.interactive-element:active {
    transform: scale(0.98);
}

/* Advanced Loading States */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 50%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Tooltip System */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1F2937, #111827);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1F2937;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    bottom: 130%;
}

/* Advanced Form Design */
.form-floating {
    position: relative;
}

.form-floating input,
.form-floating textarea {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 16px 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-floating label {
    position: absolute;
    top: 20px;
    right: 16px;
    transition: all 0.3s ease;
    color: var(--text-gray);
    pointer-events: none;
}

.form-floating input:focus,
.form-floating textarea:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.form-floating input:focus ~ label,
.form-floating input:not(:placeholder-shown) ~ label,
.form-floating textarea:focus ~ label,
.form-floating textarea:not(:placeholder-shown) ~ label {
    top: 8px;
    font-size: 0.75rem;
    color: var(--accent-purple);
    font-weight: 600;
}

/* Progress Indicators */
.progress-ring {
    width: 120px;
    height: 120px;
    position: relative;
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.35s;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

/* Status Indicators */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.status-dot.active {
    background: var(--success-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

/* Advanced Grid System */
.modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.modern-grid-item {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.modern-grid-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.15);
}

/* Chip/Tag Design */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    color: var(--accent-purple);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(139, 92, 246, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.chip:hover {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    color: white;
    transform: scale(1.05);
}

/* Divider with Gradient */
.gradient-divider {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-purple), var(--accent-pink), transparent);
    margin: 40px 0;
    border: none;
}

/* Notification System */
.notification-modern {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-right: 4px solid var(--accent-purple);
    z-index: 10001;
    animation: slideInRight 0.4s ease;
    max-width: 400px;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Enhanced Section Headers */
.section-header-modern {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-header-modern::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.section-header-modern h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #1F2937, #3B82F6, #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header-modern p {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .fab {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        bottom: 20px;
        left: 20px;
    }
    
    .display-1 {
        font-size: 2.5rem;
    }
    
    .display-2 {
        font-size: 2rem;
    }
}

