/*
 * UI/UX ENHANCEMENTS
 * Inspired by: Dyno, MEE6, YAGPDB, Stripe best practices
 * Features: Loading states, animations, better feedback, mobile optimization
 */

/* ==================== LOADING STATES ==================== */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spinner 0.6s linear infinite;
}

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

/* Pulse animation for loading */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* Skeleton loading for cards */
.skeleton {
    animation: skeleton-loading 1.5s linear infinite alternate;
    background: linear-gradient(90deg, #2a2d3a 0%, #3a3f51 50%, #2a2d3a 100%);
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==================== PAGE TRANSITIONS ==================== */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

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

.slide-in-bottom {
    animation: slideInBottom 0.5s ease-out;
}

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

.scale-in {
    animation: scaleIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

/* ==================== IMPROVED ALERTS/FLASH MESSAGES ==================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInBottom 0.4s ease-out;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alert::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.2rem;
}

.alert-success {
    background: linear-gradient(135deg, #52c234 0%, #77dd77 100%);
    color: white;
    border-left: 4px solid #3a9d1f;
}

.alert-success::before {
    content: "\f058"; /* check-circle */
}

.alert-error,
.alert-danger {
    background: linear-gradient(135deg, #dc3545 0%, #ff4757 100%);
    color: white;
    border-left: 4px solid #b02a37;
}

.alert-error::before,
.alert-danger::before {
    content: "\f06a"; /* exclamation-circle */
}

.alert-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffdb4d 100%);
    color: #333;
    border-left: 4px solid #d39e00;
}

.alert-warning::before {
    content: "\f071"; /* exclamation-triangle */
}

.alert-info {
    background: linear-gradient(135deg, #17a2b8 0%, #63d3e8 100%);
    color: white;
    border-left: 4px solid #117a8b;
}

.alert-info::before {
    content: "\f05a"; /* info-circle */
}

/* ==================== BUTTON IMPROVEMENTS ==================== */
button, .btn, a.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

button:hover:not(:disabled), .btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

button:active:not(:disabled), .btn:active:not(:disabled) {
    transform: translateY(0);
}

button:disabled, .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Ripple effect on click */
button::before, .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::before:not(:disabled), .btn:active::before:not(:disabled) {
    width: 300px;
    height: 300px;
}

/* ==================== TOOLTIP SYSTEM ==================== */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: #1a1d29;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    border: 1px solid #3a3f51;
}

[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) scale(0);
    border: 6px solid transparent;
    border-top-color: #1a1d29;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    z-index: 1000;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
    transform: translateX(-50%) scale(1);
}

/* ==================== IMPROVED CARDS ==================== */
.card, .pricing-card, .dashboard-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover, .dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.pricing-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent, #ff5c00);
}

/* Card shine effect on hover */
.card::before, .dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s;
}

.card:hover::before, .dashboard-card:hover::before {
    left: 100%;
}

/* ==================== PROGRESS INDICATORS ==================== */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #2a2d3a;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent, #ff5c00), #ff8c42);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

@keyframes progress-shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ==================== FORM IMPROVEMENTS ==================== */
input, select, textarea {
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(255, 92, 0, 0.2);
    outline: none;
}

/* Floating labels */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group label {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    color: #b0b3b8;
    transition: all 0.3s ease;
    pointer-events: none;
    background: #242838;
    padding: 0 0.5rem;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: -0.5rem;
    font-size: 0.8rem;
    color: var(--accent, #ff5c00);
}

/* ==================== MOBILE OPTIMIZATIONS ==================== */
@media (max-width: 768px) {
    /* Larger touch targets */
    button, .btn, a.btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    /* Simplified hover effects (no transform on mobile) */
    button:hover, .btn:hover, .card:hover {
        transform: none;
    }
    
    /* Stacked layout for cards */
    .pricing-container {
        grid-template-columns: 1fr !important;
    }
    
    /* Larger text for readability */
    body {
        font-size: 16px;
    }
}

/* ==================== BADGE IMPROVEMENTS ==================== */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    animation: scaleIn 0.3s ease-out;
}

.badge-premium {
    background: linear-gradient(135deg, #ff5c00, #ff8c42);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 92, 0, 0.3);
}

.badge-free {
    background: #2a2d3a;
    color: #b0b3b8;
    border: 1px solid #3a3f51;
}

.badge-active {
    background: linear-gradient(135deg, #52c234, #77dd77);
    color: white;
    box-shadow: 0 2px 8px rgba(82, 194, 52, 0.3);
}

.badge-cancelled {
    background: linear-gradient(135deg, #dc3545, #ff4757);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* ==================== ACCESSIBILITY IMPROVEMENTS ==================== */
/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--accent, #ff5c00);
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== UTILITY CLASSES ==================== */
.text-gradient {
    background: linear-gradient(135deg, #ff5c00, #ff8c42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(255, 92, 0, 0.3);
}

.bounce {
    animation: bounce 1s infinite;
}

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

 * UI/UX ENHANCEMENTS
 * Inspired by: Dyno, MEE6, YAGPDB, Stripe best practices
 * Features: Loading states, animations, better feedback, mobile optimization
 */

/* ==================== LOADING STATES ==================== */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spinner 0.6s linear infinite;
}

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

/* Pulse animation for loading */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* Skeleton loading for cards */
.skeleton {
    animation: skeleton-loading 1.5s linear infinite alternate;
    background: linear-gradient(90deg, #2a2d3a 0%, #3a3f51 50%, #2a2d3a 100%);
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==================== PAGE TRANSITIONS ==================== */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

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

.slide-in-bottom {
    animation: slideInBottom 0.5s ease-out;
}

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

.scale-in {
    animation: scaleIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

/* ==================== IMPROVED ALERTS/FLASH MESSAGES ==================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInBottom 0.4s ease-out;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alert::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.2rem;
}

.alert-success {
    background: linear-gradient(135deg, #52c234 0%, #77dd77 100%);
    color: white;
    border-left: 4px solid #3a9d1f;
}

.alert-success::before {
    content: "\f058"; /* check-circle */
}

.alert-error,
.alert-danger {
    background: linear-gradient(135deg, #dc3545 0%, #ff4757 100%);
    color: white;
    border-left: 4px solid #b02a37;
}

.alert-error::before,
.alert-danger::before {
    content: "\f06a"; /* exclamation-circle */
}

.alert-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffdb4d 100%);
    color: #333;
    border-left: 4px solid #d39e00;
}

.alert-warning::before {
    content: "\f071"; /* exclamation-triangle */
}

.alert-info {
    background: linear-gradient(135deg, #17a2b8 0%, #63d3e8 100%);
    color: white;
    border-left: 4px solid #117a8b;
}

.alert-info::before {
    content: "\f05a"; /* info-circle */
}

/* ==================== BUTTON IMPROVEMENTS ==================== */
button, .btn, a.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

button:hover:not(:disabled), .btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

button:active:not(:disabled), .btn:active:not(:disabled) {
    transform: translateY(0);
}

button:disabled, .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Ripple effect on click */
button::before, .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::before:not(:disabled), .btn:active::before:not(:disabled) {
    width: 300px;
    height: 300px;
}

/* ==================== TOOLTIP SYSTEM ==================== */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: #1a1d29;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    border: 1px solid #3a3f51;
}

[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) scale(0);
    border: 6px solid transparent;
    border-top-color: #1a1d29;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    z-index: 1000;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
    transform: translateX(-50%) scale(1);
}

/* ==================== IMPROVED CARDS ==================== */
.card, .pricing-card, .dashboard-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover, .dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.pricing-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent, #ff5c00);
}

/* Card shine effect on hover */
.card::before, .dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s;
}

.card:hover::before, .dashboard-card:hover::before {
    left: 100%;
}

/* ==================== PROGRESS INDICATORS ==================== */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #2a2d3a;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent, #ff5c00), #ff8c42);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

@keyframes progress-shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ==================== FORM IMPROVEMENTS ==================== */
input, select, textarea {
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(255, 92, 0, 0.2);
    outline: none;
}

/* Floating labels */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group label {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    color: #b0b3b8;
    transition: all 0.3s ease;
    pointer-events: none;
    background: #242838;
    padding: 0 0.5rem;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: -0.5rem;
    font-size: 0.8rem;
    color: var(--accent, #ff5c00);
}

/* ==================== MOBILE OPTIMIZATIONS ==================== */
@media (max-width: 768px) {
    /* Larger touch targets */
    button, .btn, a.btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    /* Simplified hover effects (no transform on mobile) */
    button:hover, .btn:hover, .card:hover {
        transform: none;
    }
    
    /* Stacked layout for cards */
    .pricing-container {
        grid-template-columns: 1fr !important;
    }
    
    /* Larger text for readability */
    body {
        font-size: 16px;
    }
}

/* ==================== BADGE IMPROVEMENTS ==================== */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    animation: scaleIn 0.3s ease-out;
}

.badge-premium {
    background: linear-gradient(135deg, #ff5c00, #ff8c42);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 92, 0, 0.3);
}

.badge-free {
    background: #2a2d3a;
    color: #b0b3b8;
    border: 1px solid #3a3f51;
}

.badge-active {
    background: linear-gradient(135deg, #52c234, #77dd77);
    color: white;
    box-shadow: 0 2px 8px rgba(82, 194, 52, 0.3);
}

.badge-cancelled {
    background: linear-gradient(135deg, #dc3545, #ff4757);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* ==================== ACCESSIBILITY IMPROVEMENTS ==================== */
/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--accent, #ff5c00);
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== UTILITY CLASSES ==================== */
.text-gradient {
    background: linear-gradient(135deg, #ff5c00, #ff8c42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(255, 92, 0, 0.3);
}

.bounce {
    animation: bounce 1s infinite;
}

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

 * UI/UX ENHANCEMENTS
 * Inspired by: Dyno, MEE6, YAGPDB, Stripe best practices
 * Features: Loading states, animations, better feedback, mobile optimization
 */

/* ==================== LOADING STATES ==================== */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spinner 0.6s linear infinite;
}

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

/* Pulse animation for loading */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* Skeleton loading for cards */
.skeleton {
    animation: skeleton-loading 1.5s linear infinite alternate;
    background: linear-gradient(90deg, #2a2d3a 0%, #3a3f51 50%, #2a2d3a 100%);
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==================== PAGE TRANSITIONS ==================== */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

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

.slide-in-bottom {
    animation: slideInBottom 0.5s ease-out;
}

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

.scale-in {
    animation: scaleIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

/* ==================== IMPROVED ALERTS/FLASH MESSAGES ==================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInBottom 0.4s ease-out;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alert::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.2rem;
}

.alert-success {
    background: linear-gradient(135deg, #52c234 0%, #77dd77 100%);
    color: white;
    border-left: 4px solid #3a9d1f;
}

.alert-success::before {
    content: "\f058"; /* check-circle */
}

.alert-error,
.alert-danger {
    background: linear-gradient(135deg, #dc3545 0%, #ff4757 100%);
    color: white;
    border-left: 4px solid #b02a37;
}

.alert-error::before,
.alert-danger::before {
    content: "\f06a"; /* exclamation-circle */
}

.alert-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffdb4d 100%);
    color: #333;
    border-left: 4px solid #d39e00;
}

.alert-warning::before {
    content: "\f071"; /* exclamation-triangle */
}

.alert-info {
    background: linear-gradient(135deg, #17a2b8 0%, #63d3e8 100%);
    color: white;
    border-left: 4px solid #117a8b;
}

.alert-info::before {
    content: "\f05a"; /* info-circle */
}

/* ==================== BUTTON IMPROVEMENTS ==================== */
button, .btn, a.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

button:hover:not(:disabled), .btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

button:active:not(:disabled), .btn:active:not(:disabled) {
    transform: translateY(0);
}

button:disabled, .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Ripple effect on click */
button::before, .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::before:not(:disabled), .btn:active::before:not(:disabled) {
    width: 300px;
    height: 300px;
}

/* ==================== TOOLTIP SYSTEM ==================== */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: #1a1d29;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    border: 1px solid #3a3f51;
}

[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) scale(0);
    border: 6px solid transparent;
    border-top-color: #1a1d29;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    z-index: 1000;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
    transform: translateX(-50%) scale(1);
}

/* ==================== IMPROVED CARDS ==================== */
.card, .pricing-card, .dashboard-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover, .dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.pricing-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent, #ff5c00);
}

/* Card shine effect on hover */
.card::before, .dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s;
}

.card:hover::before, .dashboard-card:hover::before {
    left: 100%;
}

/* ==================== PROGRESS INDICATORS ==================== */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #2a2d3a;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent, #ff5c00), #ff8c42);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

@keyframes progress-shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ==================== FORM IMPROVEMENTS ==================== */
input, select, textarea {
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(255, 92, 0, 0.2);
    outline: none;
}

/* Floating labels */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group label {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    color: #b0b3b8;
    transition: all 0.3s ease;
    pointer-events: none;
    background: #242838;
    padding: 0 0.5rem;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: -0.5rem;
    font-size: 0.8rem;
    color: var(--accent, #ff5c00);
}

/* ==================== MOBILE OPTIMIZATIONS ==================== */
@media (max-width: 768px) {
    /* Larger touch targets */
    button, .btn, a.btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    /* Simplified hover effects (no transform on mobile) */
    button:hover, .btn:hover, .card:hover {
        transform: none;
    }
    
    /* Stacked layout for cards */
    .pricing-container {
        grid-template-columns: 1fr !important;
    }
    
    /* Larger text for readability */
    body {
        font-size: 16px;
    }
}

/* ==================== BADGE IMPROVEMENTS ==================== */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    animation: scaleIn 0.3s ease-out;
}

.badge-premium {
    background: linear-gradient(135deg, #ff5c00, #ff8c42);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 92, 0, 0.3);
}

.badge-free {
    background: #2a2d3a;
    color: #b0b3b8;
    border: 1px solid #3a3f51;
}

.badge-active {
    background: linear-gradient(135deg, #52c234, #77dd77);
    color: white;
    box-shadow: 0 2px 8px rgba(82, 194, 52, 0.3);
}

.badge-cancelled {
    background: linear-gradient(135deg, #dc3545, #ff4757);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* ==================== ACCESSIBILITY IMPROVEMENTS ==================== */
/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--accent, #ff5c00);
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== UTILITY CLASSES ==================== */
.text-gradient {
    background: linear-gradient(135deg, #ff5c00, #ff8c42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(255, 92, 0, 0.3);
}

.bounce {
    animation: bounce 1s infinite;
}

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

