:root {
    --outlier-primary: #5B2A5A;
    --outlier-primary-light: #7B4A7A;
    --outlier-primary-dark: #3B1A3A;
    --outlier-secondary: #8B5A8A;
    --outlier-accent: #AB7AAA;
    --outlier-gradient: linear-gradient(135deg, #5B2A5A 0%, #7B4A7A 100%);
    --outlier-shadow: 0 20px 40px rgba(91, 42, 90, 0.15);
    --outlier-success: #4CAF50;
    --outlier-error: #F44336;
    --outlier-warning: #FF9800;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

/* Trigger Button */
.outlier-trigger-btn {
    background: var(--outlier-gradient);
    color: #ffffff;
    padding: 16px 32px;
    border: none;
    border-radius: 11px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(91, 42, 90, 0.3);
}

.outlier-trigger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(91, 42, 90, 0.4);
}

.outlier-trigger-btn:active {
    transform: translateY(0);
}

.outlier-btn-icon {
    transition: transform 0.3s ease;
}

.outlier-trigger-btn:hover .outlier-btn-icon {
    transform: translateX(5px);
}

.outlier-trigger-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;
}

.outlier-trigger-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Modal Overlay */
.outlier-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.outlier-modal-overlay.outlier-show {
    display: flex;
    opacity: 1;
}

/* Modal Container */
.outlier-modal-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: var(--outlier-shadow);
    width: 90vw;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 40px 0;
}

.outlier-modal-overlay.outlier-show .outlier-modal-container {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Close Button */
.outlier-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: rgba(91, 42, 90, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.outlier-close-btn:hover {
    background: var(--outlier-primary);
    transform: rotate(90deg);
}

.outlier-close-btn span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 2px;
    background: var(--outlier-primary);
    transition: background 0.3s ease;
}

.outlier-close-btn:hover span {
    background: #ffffff;
}

.outlier-close-btn span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.outlier-close-btn span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Modal Header */
.outlier-modal-header {
    text-align: center;
    padding: 40px 30px 30px;
    position: relative;
    background: linear-gradient(to bottom, rgba(91, 42, 90, 0.05), transparent);
}

.outlier-header-icon {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.outlier-icon-circle {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--outlier-primary);
    animation: outlierPulse 2s infinite;
}

.outlier-icon-circle:nth-child(2) {
    animation-delay: 0.2s;
}

.outlier-icon-circle:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes outlierPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

.outlier-modal-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--outlier-primary);
    letter-spacing: -0.5px;
}

.outlier-modal-subtitle {
    margin: 8px 0 0;
    font-size: 15px;
    color: #666666;
    font-weight: 400;
}

/* Tabs Navigation */
.outlier-tabs-nav {
    display: flex;
    position: relative;
    background: rgba(91, 42, 90, 0.05);
    padding: 4px;
    margin: 0 20px;
    border-radius: 12px;
}

.outlier-tab-btn {
    flex: 1;
    padding: 14px 20px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #999999;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

.outlier-tab-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.outlier-tab-btn:hover {
    color: var(--outlier-primary);
}

.outlier-tab-btn:hover .outlier-tab-icon {
    transform: scale(1.1);
}

.outlier-tab-btn.outlier-active {
    color: #ffffff;
}

.outlier-tab-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    width: calc(50% - 4px);
    background: var(--outlier-gradient);
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(91, 42, 90, 0.3);
}

.outlier-tab-btn:last-of-type.outlier-active ~ .outlier-tab-indicator {
    transform: translateX(100%);
}

/* Tab Content */
.outlier-tabs-content {
    padding: 30px;
}

.outlier-tab-pane {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s, transform 0.4s;
}

.outlier-tab-pane.outlier-active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

@keyframes outlierSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Form Styles */
.outlier-form-group {
    margin-bottom: 24px;
    position: relative;
}

.outlier-label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    display: flex;
    align-items: center;
    gap: 5px;
}

.outlier-required {
    color: var(--outlier-error);
    font-size: 16px;
}

.outlier-input-wrapper {
    position: relative;
}

.outlier-input {
    width: 100%;
    padding: 14px 45px 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    color: #333333;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
}

.outlier-input:focus {
    border-color: var(--outlier-primary);
    box-shadow: 0 0 0 4px rgba(91, 42, 90, 0.1);
}

.outlier-input.outlier-error {
    border-color: var(--outlier-error);
    animation: outlierShake 0.4s ease;
}

.outlier-input.outlier-success {
    border-color: var(--outlier-success);
}

@keyframes outlierShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.outlier-input::placeholder {
    color: #bbbbbb;
}

.outlier-input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.outlier-input:focus ~ .outlier-input-icon {
    opacity: 1;
}

.outlier-validation-icon {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: 0;
    transition: all 0.3s ease;
}

.outlier-validation-icon.outlier-show-success::after {
    content: '✓';
    color: var(--outlier-success);
    font-weight: bold;
    opacity: 1;
}

.outlier-validation-icon.outlier-show-error::after {
    content: '✕';
    color: var(--outlier-error);
    font-weight: bold;
    opacity: 1;
}

.outlier-error-message {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--outlier-error);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    height: 0;
}

.outlier-error-message.outlier-show {
    opacity: 1;
    transform: translateY(0);
    height: auto;
}

/* Submit Button */
.outlier-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--outlier-gradient);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(91, 42, 90, 0.3);
}

.outlier-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(91, 42, 90, 0.4);
}

.outlier-submit-btn:active {
    transform: translateY(0);
}

.outlier-submit-btn.outlier-loading {
    pointer-events: none;
    opacity: 0.8;
}

.outlier-btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    opacity: 0;
    animation: outlierSpin 0.8s linear infinite;
}

.outlier-submit-btn.outlier-loading .outlier-btn-text {
    opacity: 0;
}

.outlier-submit-btn.outlier-loading .outlier-btn-loader {
    opacity: 1;
}

@keyframes outlierSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success Modal */
.outlier-success-container {
    background: #ffffff;
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.outlier-modal-overlay.outlier-show .outlier-success-container {
    transform: scale(1);
    opacity: 1;
}

/* Success Modal - SVG Checkmark */
.outlier-success-animation {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.outlier-success-checkmark {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--outlier-primary), var(--outlier-secondary));
    border-radius: 50%;
    box-shadow: 0 5px 20px rgba(91, 42, 90, 0.3);
    animation: outlierScaleIn 0.5s ease forwards;
    position: relative;
}

.outlier-checkmark-svg {
    width: 60px;
    height: 60px;
    display: block;
    margin: 0 auto;
}

@keyframes outlierStroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes outlierScaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.outlier-checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #ffffff;
    fill: none;
    animation: outlierStroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.outlier-checkmark-stem {
    position: absolute;
    width: 3px;
    height: 35px;
    background-color: #ffffff;
    left: 48px;
    top: 35px;
    transform: rotate(-45deg);
    animation: outlierStemGrow 0.3s ease 0.5s forwards;
    transform-origin: bottom;
    opacity: 0;
}

.outlier-checkmark-kick {
    position: absolute;
    width: 3px;
    height: 20px;
    background-color: #ffffff;
    left: 35px;
    top: 48px;
    transform: rotate(45deg);
    animation: outlierKickGrow 0.3s ease 0.5s forwards;
    transform-origin: bottom;
    opacity: 0;
}

@keyframes outlierStemGrow {
    to {
        opacity: 1;
        transform: rotate(-45deg) scaleY(1);
    }
}

@keyframes outlierKickGrow {
    to {
        opacity: 1;
        transform: rotate(45deg) scaleY(1);
    }
}

.outlier-success-title {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 700;
    color: var(--outlier-primary);
}

.outlier-success-message {
    margin: 0 0 30px;
    font-size: 16px;
    color: #666666;
    line-height: 1.5;
}

.outlier-success-btn {
    padding: 14px 40px;
    background: var(--outlier-gradient);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(91, 42, 90, 0.3);
}

.outlier-success-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(91, 42, 90, 0.4);
}

/* Responsive Design */
@media (max-width: 576px) {
    .outlier-modal-container {
        width: 98vw;
        margin: 10px 0;
        border-radius: 14px;
        max-height: 98vh;
        padding-bottom: 10px;
    }

    .outlier-modal-header {
        padding: 20px 10px 10px;
    }

    .outlier-modal-title {
        font-size: 24px;
    }

    .outlier-tabs-content {
        padding: 10px;
    }

    .outlier-success-container {
        padding: 20px 5px;
    }

    .outlier-success-animation {
        width: 80px;
        height: 80px;
    }

    .outlier-success-checkmark {
        width: 80px;
        height: 80px;
    }

    .outlier-trigger-btn {
        display: block;
        margin: 0 auto;
        max-width: 100%;
        padding: 14px 12px;
        font-size: 15px;
        box-sizing: border-box;
        white-space: normal;
    }
}

/* Scrollbar Styling */
.outlier-modal-container::-webkit-scrollbar {
    width: 6px;
}

.outlier-modal-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.outlier-modal-container::-webkit-scrollbar-thumb {
    background: var(--outlier-primary);
    border-radius: 10px;
}

.outlier-modal-container::-webkit-scrollbar-thumb:hover {
    background: var(--outlier-primary-dark);
}