/* A/B Testing Panel Styles */

/* Floating trigger buttons */
.ab-trigger-btn,
.ul-trigger-btn {
    position: fixed;
    bottom: 20px;
    width: 50px;
    height: 50px;
    background: var(--text);
    color: var(--bg);
    border: 2px solid var(--border);
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ab-trigger-btn {
    right: 20px;
}

.ul-trigger-btn {
    right: 80px;
}

.ab-trigger-btn:hover,
.ul-trigger-btn:hover {
    transform: scale(1.1);
    background: var(--highlight);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.ab-testing-panel,
.ul-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 500px;
    max-width: 90vw;
    max-height: 80vh;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 0;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.ab-testing-panel.ab-panel-visible,
.ul-panel.ul-panel-visible {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Panel Header */
.ab-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--hover);
}

.ab-panel-header h3 {
    margin: 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text);
}

.ab-panel-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.ab-panel-close:hover {
    opacity: 1;
}

/* Panel Content */
.ab-panel-content {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 120px);
}

.ab-tests-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Test Item */
.ab-test-item {
    border: 1px solid var(--border);
    padding: 15px;
    background: var(--bg);
}

.ab-test-header h4 {
    margin: 0 0 5px 0;
    font-size: 13px;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ab-test-description {
    margin: 0 0 15px 0;
    font-size: 11px;
    color: var(--dim);
    opacity: 0.8;
}

.ab-test-variants {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ab-variant-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    color: var(--text);
}

.ab-variant-option:hover {
    background: var(--hover);
    border-color: var(--text);
}

.ab-variant-option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

.ab-variant-option input[type="radio"]:checked + span {
    font-weight: bold;
    color: var(--highlight);
}

/* Panel Footer */
.ab-panel-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    background: var(--hover);
}

.ab-apply-btn,
.ab-reset-btn {
    flex: 1;
    padding: 10px 20px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ab-apply-btn {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.ab-apply-btn:hover {
    background: var(--highlight);
    border-color: var(--highlight);
}

.ab-reset-btn:hover {
    background: var(--hover);
    border-color: var(--text);
}

/* Notification */
.ab-notification {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--text);
    color: var(--bg);
    padding: 10px 20px;
    font-size: 12px;
    border-radius: 0;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10001;
}

.ab-notification.ab-notification-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Dark theme compatibility */
body.theme-dark .ab-testing-panel {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

/* Scrollbar for panel content */
.ab-panel-content::-webkit-scrollbar,
.ul-panel-content::-webkit-scrollbar {
    width: 4px;
}

.ab-panel-content::-webkit-scrollbar-track,
.ul-panel-content::-webkit-scrollbar-track {
    background: var(--border);
}

.ab-panel-content::-webkit-scrollbar-thumb,
.ul-panel-content::-webkit-scrollbar-thumb {
    background: var(--text);
    opacity: 0.5;
}

.ab-panel-content::-webkit-scrollbar-thumb:hover,
.ul-panel-content::-webkit-scrollbar-thumb:hover {
    opacity: 0.7;
}

/* U/L Panel specific styles */
.ul-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--hover);
}

.ul-panel-header h3 {
    margin: 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text);
}

.ul-panel-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.ul-panel-close:hover {
    opacity: 1;
}

.ul-panel-content {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 120px);
}

.ul-panel-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    background: var(--hover);
}

/* Resume upload section */
.resume-upload-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.resume-upload-label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text);
}

.resume-upload-input {
    width: 100%;
    padding: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
}

/* Skills rating section */
.skills-rating-section {
    margin-bottom: 20px;
}

.skills-rating-title {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    color: var(--text);
}

.skill-item {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--hover);
    border: 1px solid var(--border);
}

.skill-name {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text);
}

.skill-ratings {
    display: flex;
    gap: 20px;
    align-items: center;
}

.skill-rating-group {
    flex: 1;
}

.skill-rating-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    opacity: 0.8;
}

.skill-rating-buttons {
    display: flex;
    gap: 2px;
}

.skill-rating-btn {
    width: 28px;
    height: 28px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.skill-rating-btn:hover {
    background: var(--highlight);
    color: var(--bg);
}

.skill-rating-btn.selected {
    background: var(--text);
    color: var(--bg);
}

/* Generate link button */
.ul-generate-btn {
    flex: 1;
    padding: 10px 20px;
    background: var(--highlight);
    color: var(--bg);
    border: 1px solid var(--highlight);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.ul-generate-btn:hover {
    background: var(--text);
    border-color: var(--text);
}

.ul-apply-btn,
.ul-reset-btn {
    padding: 10px 20px;
    background: var(--text);
    color: var(--bg);
    border: 1px solid var(--text);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ul-reset-btn {
    background: transparent;
    color: var(--text);
}

.ul-reset-btn:hover {
    background: var(--hover);
    border-color: var(--text);
}

/* Keyboard shortcut hint */
.ab-testing-panel::before {
    content: 'Alt+Q to toggle';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--dim);
    opacity: 0.5;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Animation Classes for A/B Testing */
.ab-anim-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.ab-anim-slide:hover {
    transform: translateX(10px);
}

.ab-anim-glow:hover {
    box-shadow: 0 0 20px var(--highlight), 0 0 40px var(--highlight);
}

.ab-anim-pulse:hover {
    animation: abPulse 1.5s infinite;
}

.ab-anim-shake:hover {
    animation: abShake 0.5s infinite;
}

.ab-anim-sweep {
    position: relative;
    overflow: hidden;
}
.ab-anim-sweep::after {
    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;
}
.ab-anim-sweep:hover::after {
    left: 100%;
}

.ab-anim-border {
    position: relative;
}
.ab-anim-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--highlight), var(--text));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}
.ab-anim-border:hover::before {
    opacity: 1;
}

.ab-anim-rotate:hover {
    transform: rotate(5deg) scale(1.05);
}

.ab-anim-neon {
    border: 2px solid var(--highlight);
    background: transparent;
    color: var(--highlight);
    box-shadow: 0 0 5px var(--highlight);
}
.ab-anim-neon:hover {
    background: var(--highlight);
    color: var(--bg);
    box-shadow: 0 0 20px var(--highlight), 0 0 40px var(--highlight);
}

.ab-anim-explode:hover {
    animation: abExplode 0.5s forwards;
}

.ab-anim-morph {
    border-radius: 30px;
}
.ab-anim-morph:hover {
    border-radius: 0;
    transform: translateY(-5px) scale(1.05);
}

.ab-anim-peekaboo {
    position: relative;
}
.ab-anim-peekaboo::before,
.ab-anim-peekaboo::after {
    content: '';
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: var(--bg);
    z-index: -1;
    transition: 0.3s ease;
}
.ab-anim-peekaboo::before {
    left: 0;
}
.ab-anim-peekaboo::after {
    right: 0;
}
.ab-anim-peekaboo:hover::before {
    transform: translateX(-20%);
    background: var(--hover);
    z-index: 1;
}
.ab-anim-peekaboo:hover::after {
    transform: translateX(20%);
    background: var(--hover);
    z-index: 1;
}

.ab-anim-fill {
    border: 2px solid var(--highlight);
    background: transparent;
    color: var(--highlight);
    position: relative;
}
.ab-anim-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--highlight);
    z-index: -1;
    transition: 0.5s;
}
.ab-anim-fill:hover {
    color: var(--bg);
}
.ab-anim-fill:hover::before {
    width: 100%;
}

.ab-anim-lightning {
    border: 2px solid var(--highlight);
}
.ab-anim-lightning:hover {
    animation: abLightning 1.5s infinite;
}

.ab-anim-flip {
    transform-style: preserve-3d;
    transition: transform 0.6s;
}
.ab-anim-flip:hover {
    transform: rotateY(180deg);
}

.ab-anim-zoom:hover {
    animation: abBlur 0.5s forwards;
    letter-spacing: 3px;
}

.ab-anim-magnetic:hover {
    transform: scale(1.1);
    animation: abMagnet 0.4s ease-in-out alternate infinite;
}

.ab-anim-shimmer {
    position: relative;
    overflow: hidden;
}
.ab-anim-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.5), transparent);
    transform: skewX(-20deg);
    transition: all 0.5s;
}
.ab-anim-shimmer:hover::after {
    left: 130%;
}

.ab-anim-bounce:hover {
    animation: abBouncePop 0.4s ease;
}

.ab-anim-conic {
    background-size: 200% 200%;
    background-image: conic-gradient(from 0deg, var(--highlight), var(--text), var(--highlight));
}
.ab-anim-conic:hover {
    animation: abSwirlReveal 1.6s infinite linear;
}

/* Animations */
@keyframes abPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

@keyframes abShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px) rotate(-5deg);
    }
    50% {
        transform: translateX(5px) rotate(5deg);
    }
    75% {
        transform: translateX(-5px) rotate(-5deg);
    }
}

@keyframes abExplode {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    60% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1.1);
    }
}

@keyframes abLightning {
    0%, 50%, 100% {
        box-shadow: 0 0 5px var(--highlight);
    }
    25% {
        box-shadow: 0 0 20px var(--highlight);
    }
    75% {
        box-shadow: 0 0 30px var(--highlight), 0 0 50px var(--highlight);
    }
}

@keyframes abBlur {
    0% {
        filter: blur(0);
        transform: scale(1);
    }
    50% {
        filter: blur(3px);
        transform: scale(1.1);
    }
    100% {
        filter: blur(0);
        transform: scale(1.05);
    }
}

@keyframes abMagnet {
    0% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1.1) rotate(-2deg);
    }
}

@keyframes abBouncePop {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.2);
    }
    60% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes abSwirlReveal {
    0% {
        background-position: -10% 50%;
    }
    50% {
        background-position: 110% 50%;
    }
    100% {
        background-position: -20% 50%;
    }
}