/* Container Background & Reset */
.crf-container {
    direction: rtl;
    font-family: inherit;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    position: relative;
}

/* Modern Card with Tech-Glow effect */
.crf-card {
    background: #ffffff;
    width: 100%;
    max-width: 580px;
    padding: 45px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.crf-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 70px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.25);
}

/* Ambient Background Glow */
.crf-glow-bg {
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    filter: blur(70px);
    opacity: 0.15;
    pointer-events: none;
}

/* Typography */
.crf-title {
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.crf-subtitle {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 35px;
}

/* Form Structure */
.crf-form-wrapper {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.crf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Fields & Labels */
.crf-group {
    display: flex;
    flex-direction: column;
}

.crf-group label {
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 9px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.crf-group label span {
    color: #ef4444;
}

/* Inputs, Select & Textarea Style */
.crf-group input,
.crf-group select,
.crf-group textarea {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 14.5px;
    font-family: inherit;
    background-color: #f8fafc;
    color: #1e293b;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.crf-group textarea {
    resize: vertical;
}

/* Smooth Interactive Input Focus */
.crf-group input:focus,
.crf-group select:focus,
.crf-group textarea:focus {
    border-color: #6366f1;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
    outline: none;
}

/* Shimmer Animated Submit Button */
.crf-submit-btn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    font-family: inherit;
    margin-top: 10px;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
}

/* Shimmer effect animation */
.crf-submit-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 30%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    animation: shimmerEffect 4s infinite linear;
}

@keyframes shimmerEffect {
    0% { left: -60%; }
    100% { left: 140%; }
}

.crf-submit-btn:hover {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.45);
}

.crf-submit-btn:active {
    transform: translateY(-1px);
}

/* Entry Animation (Blur & Fade) */
.animate-blur {
    animation: blurReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes blurReveal {
    from {
        opacity: 0;
        filter: blur(10px);
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

/* Success & Error Alerts */
.crf-alert {
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    animation: alertSlideIn 0.4s ease-out;
}

.crf-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.crf-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

@keyframes alertSlideIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .crf-row {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .crf-card {
        padding: 30px 20px;
    }
    .crf-title {
        font-size: 22px;
    }
}