/* Uiverse.io Inspired UI Components for Training Center CRM */
:root {
    --uiverse-primary: #3498db;
    --uiverse-secondary: #2c3e50;
    --uiverse-success: #27ae60;
    --uiverse-warning: #f39c12;
    --uiverse-danger: #e74c3c;
    --uiverse-info: #17a2b8;
    --uiverse-light: #f8f9fa;
    --uiverse-dark: #343a40;
    --uiverse-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --uiverse-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --uiverse-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --uiverse-gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --uiverse-shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.1);
    --uiverse-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --uiverse-shadow-active: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Modern Glass Morphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--uiverse-shadow-soft);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--uiverse-shadow-hover);
    background: rgba(255, 255, 255, 0.35);
}

/* Animated Gradient Buttons */
.btn-gradient {
    background: var(--uiverse-gradient-1);
    border: none;
    border-radius: 50px;
    color: white;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--uiverse-shadow-soft);
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-gradient:hover::before {
    left: 100%;
}

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

.btn-gradient-success {
    background: var(--uiverse-gradient-4);
}

.btn-gradient-warning {
    background: var(--uiverse-gradient-2);
}

.btn-gradient-info {
    background: var(--uiverse-gradient-3);
}

/* Floating Action Button */
.fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--uiverse-gradient-1);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    box-shadow: var(--uiverse-shadow-soft);
    transition: all 0.3s ease;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: var(--uiverse-shadow-hover);
}

.fab:active {
    transform: scale(0.95);
}

/* Neumorphism Elements */
.neomorphism {
    background: #f0f0f3;
    border-radius: 20px;
    box-shadow: 9px 9px 16px #a3a3a3, -9px -9px 16px #ffffff;
    padding: 20px;
    transition: all 0.3s ease;
}

.neomorphism:hover {
    box-shadow: 6px 6px 12px #a3a3a3, -6px -6px 12px #ffffff;
}

.neomorphism-inset {
    background: #f0f0f3;
    border-radius: 15px;
    box-shadow: inset 6px 6px 12px #a3a3a3, inset -6px -6px 12px #ffffff;
    padding: 15px;
}

/* Animated Loading States */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

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

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Modern Input Fields */
.input-modern {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 15px 20px;
    color: #333;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.input-modern:focus {
    outline: none;
    border-color: var(--uiverse-primary);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.3);
}

.input-modern::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: #ccc;
    border-radius: 15px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active {
    background: var(--uiverse-success);
}

.toggle-switch.active::before {
    transform: translateX(30px);
}

/* Progress Ring */
.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 20px auto;
}

.progress-ring circle {
    width: 100%;
    height: 100%;
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.progress-ring .bg {
    stroke: #e6e6e6;
}

.progress-ring .progress {
    stroke: var(--uiverse-primary);
    stroke-dasharray: 314.159;
    stroke-dashoffset: 314.159;
    transition: stroke-dashoffset 0.5s ease-in-out;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    color: var(--uiverse-primary);
}

/* Floating Labels */
.floating-label {
    position: relative;
    margin-bottom: 20px;
}

.floating-label input,
.floating-label textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: transparent;
}

.floating-label label {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #666;
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
    background: white;
    padding: 0 5px;
}

.floating-label input:focus,
.floating-label textarea:focus,
.floating-label input:not(:placeholder-shown),
.floating-label textarea:not(:placeholder-shown) {
    border-color: var(--uiverse-primary);
    outline: none;
}

.floating-label input:focus + label,
.floating-label textarea:focus + label,
.floating-label input:not(:placeholder-shown) + label,
.floating-label textarea:not(:placeholder-shown) + label {
    top: -10px;
    left: 10px;
    font-size: 12px;
    color: var(--uiverse-primary);
    font-weight: 600;
}

/* Card Hover Effects */
.card-hover-lift {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.card-hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-hover-glow {
    transition: all 0.3s ease;
    cursor: pointer;
}

.card-hover-glow:hover {
    box-shadow: 0 0 30px rgba(52, 152, 219, 0.3);
    transform: scale(1.02);
}

/* Badge Animations */
.badge-animated {
    animation: badge-bounce 2s infinite;
}

@keyframes badge-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Success States */
.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: var(--uiverse-success);
    stroke-miterlimit: 10;
    margin: 20px auto;
    box-shadow: inset 0px 0px 0px var(--uiverse-success);
    animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.success-checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--uiverse-success);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px var(--uiverse-success);
    }
}

/* Error States */
.error-cross {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: var(--uiverse-danger);
    stroke-miterlimit: 10;
    margin: 20px auto;
    box-shadow: inset 0px 0px 0px var(--uiverse-danger);
    animation: fill-error 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.error-cross-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--uiverse-danger);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.error-cross-line {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes fill-error {
    100% {
        box-shadow: inset 0px 0px 0px 30px var(--uiverse-danger);
    }
}

/* Loading Spinner */
.spinner-uiverse {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--uiverse-primary);
    border-radius: 50%;
    animation: spin-uiverse 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin-uiverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification Toast */
.toast-uiverse {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--uiverse-shadow-soft);
    border-left: 5px solid var(--uiverse-primary);
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast-uiverse.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-uiverse.success {
    border-left-color: var(--uiverse-success);
}

.toast-uiverse.warning {
    border-left-color: var(--uiverse-warning);
}

.toast-uiverse.error {
    border-left-color: var(--uiverse-danger);
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
}

.ripple:after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 1s;
}

.ripple:active:after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Hover Effects */
.hover-float {
    transition: all 0.3s ease;
}

.hover-float:hover {
    transform: translateY(-5px);
    box-shadow: var(--uiverse-shadow-hover);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.4);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Text Animations */
.text-glow {
    color: var(--uiverse-primary);
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
    }
    to {
        text-shadow: 0 0 20px rgba(52, 152, 219, 0.8), 0 0 30px rgba(52, 152, 219, 0.8);
    }
}

/* Gradient Text */
.text-gradient {
    background: var(--uiverse-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

/* Custom Scrollbar */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--uiverse-primary) transparent;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--uiverse-primary);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--uiverse-secondary);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .glass-card {
        background: rgba(0, 0, 0, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .neomorphism {
        background: #2c3e50;
        box-shadow: 9px 9px 16px #233240, -9px -9px 16px #354a60;
    }
    
    .input-modern {
        background: rgba(0, 0, 0, 0.1);
        color: #fff;
    }
    
    .floating-label label {
        background: #2c3e50;
        color: #ccc;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .fab {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .progress-ring {
        width: 80px;
        height: 80px;
    }
    
    .toast-uiverse {
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .toast-uiverse.show {
        transform: translateY(0);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .pulse,
    .badge-animated,
    .text-glow,
    .spinner-uiverse {
        animation: none;
    }
    
    .btn-gradient::before,
    .hover-float,
    .hover-glow,
    .hover-scale,
    .card-hover-lift,
    .card-hover-glow {
        transition: none;
    }
}
