/* ============================================
   NetDidactic - Glassmorphism Effects
   ============================================ */

/* ============================================
   Glass Card - Base Component
   ============================================ */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ============================================
   Glass Card Variants
   ============================================ */

/* Subtle glass - less prominent */
.glass-card-subtle {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

/* Strong glass - more prominent */
.glass-card-strong {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Dark glass - darker background */
.glass-card-dark {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
}

/* ============================================
   Glass Card with Glow Effect
   ============================================ */
.glass-card-glow {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.glass-card-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(99, 102, 241, 0.12),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.glass-card-glow:hover::before {
    opacity: 1;
}

/* ============================================
   Glass Input Fields
   ============================================ */
.glass-input {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
    width: 100%;
}

.glass-input:focus {
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Glass textarea */
.glass-textarea {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
    width: 100%;
    min-height: 120px;
    resize: vertical;
}

.glass-textarea:focus {
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ============================================
   Glass Badges
   ============================================ */
.glass-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

/* Accent badge */
.glass-badge-accent {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
}

/* Success badge */
.glass-badge-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

/* Warning badge */
.glass-badge-warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.25);
    color: #fcd34d;
}

/* ============================================
   Glass Buttons
   ============================================ */
.glass-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.glass-btn:active {
    transform: translateY(0);
}

/* ============================================
   Glass Dividers
   ============================================ */
.glass-divider {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    margin: 40px 0;
}

.glass-divider-vertical {
    width: 1px;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
}

/* ============================================
   Glass Select
   ============================================ */
.glass-select {
    appearance: none;
    background: rgba(255, 255, 255, 0.04) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 16px center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 48px 16px 20px;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    width: 100%;
}

.glass-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.glass-select option {
    background: #12121a;
    color: #ffffff;
}

/* ============================================
   Glass Checkbox & Radio
   ============================================ */
.glass-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.glass-checkbox input {
    appearance: none;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.glass-checkbox input:checked {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
}

.glass-checkbox input:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 10px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: translate(-50%, -60%) rotate(45deg);
}

.glass-radio input {
    border-radius: 50%;
}

.glass-radio input:checked::after {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    border: none;
    transform: translate(-50%, -50%);
}

/* ============================================
   Glass Toggle Switch
   ============================================ */
.glass-toggle {
    position: relative;
    width: 52px;
    height: 28px;
}

.glass-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.glass-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    transition: all 0.3s ease;
}

.glass-toggle-slider::before {
    position: absolute;
    content: '';
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.glass-toggle input:checked + .glass-toggle-slider {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.glass-toggle input:checked + .glass-toggle-slider::before {
    transform: translateX(24px);
}

/* ============================================
   Glass Progress Bar
   ============================================ */
.glass-progress {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.glass-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ============================================
   Glass Tooltip
   ============================================ */
.glass-tooltip {
    position: relative;
}

.glass-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 13px;
    color: white;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.glass-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-12px);
}

/* ============================================
   Glass Modal Backdrop
   ============================================ */
.glass-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
}

/* ============================================
   Inner Glow Effects
   ============================================ */
.inner-glow {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.inner-glow-accent {
    box-shadow:
        inset 0 1px 0 rgba(99, 102, 241, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* ============================================
   Frosted Glass Effect (stronger blur)
   ============================================ */
.frosted {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ============================================
   Glass Skeleton Loading
   ============================================ */
.glass-skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 25%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

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

/* ============================================
   Noise Texture Overlay (optional)
   ============================================ */
.noise-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    border-radius: inherit;
}

/* ============================================
   Glass Scrollbar
   ============================================ */
.glass-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.glass-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.glass-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.glass-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}
