:root {
    --primary: #6A0DAD;
    --primary-dark: #5a0b94;
    --secondary: #FFEB3B;
    --light: #f8f9fa;
    --dark: #1e1e2c;
    --gray: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: linear-gradient(-45deg, #6A0DAD, #8B2BE2, #9b59b6, #8e44ad);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* انیمیشن‌ها */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0.3;
    }
    50% { 
        transform: translateY(-40px) rotate(180deg) scale(1.1);
        opacity: 0.6;
    }
}

@keyframes waveAnimation {
    0% { transform: translateX(0); }
    50% { transform: translateX(-30px); }
    100% { transform: translateX(0); }
}

@keyframes containerSlide {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes logoBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes iconRotate {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(10deg) scale(1.1); }
}

@keyframes lineGrow {
    from { width: 0; }
    to { width: 50px; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* المان‌های پس‌زمینه */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) { 
    width: 80px; height: 80px; top: 10%; left: 10%; animation-delay: 0s; 
}
.particle:nth-child(2) { 
    width: 120px; height: 120px; top: 60%; right: 10%; animation-delay: 2s; 
}
.particle:nth-child(3) { 
    width: 60px; height: 60px; bottom: 20%; left: 20%; animation-delay: 4s; 
}
.particle:nth-child(4) { 
    width: 100px; height: 100px; top: 30%; right: 20%; animation-delay: 1s; 
}
.particle:nth-child(5) { 
    width: 70px; height: 70px; bottom: 40%; right: 30%; animation-delay: 3s; 
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" fill="%23ffffff"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" fill="%23ffffff"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%23ffffff"/></svg>');
    background-size: cover;
    animation: waveAnimation 12s linear infinite;
    display: none;
}

/* کانتینر اصلی */
.signup-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 10;
    animation: containerSlide 0.8s ease-out;
}

/* لوگو */
.logo {
    text-align: center;
    margin-bottom: 30px;
    animation: logoBounce 2s ease-in-out;
}

.logo-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 28px;
    margin-bottom: 15px;
    box-shadow: 0 10px 25px rgba(106, 13, 173, 0.3);
    animation: iconRotate 3s ease-in-out infinite;
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

/* عنوان */
h1 {
    text-align: center;
    color: var(--dark);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 50px;
    height: 3px;
    background: var(--secondary);
    border-radius: 10px;
    animation: lineGrow 1s ease-out;
}

/* پیام‌ها */
.error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9rem;
    animation: shake 0.5s ease-in-out;
}

.success {
    background: #efe;
    border: 1px solid #cfc;
    color: #363;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9rem;
    animation: fadeIn 0.5s ease-out;
}

/* فرم */
.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.9rem;
}

input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.1);
    transform: translateY(-2px);
}

/* دکمه */
.btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    margin-top: 10px;
}

.btn:enabled {
    background: var(--primary);
    box-shadow: 0 5px 15px rgba(106, 13, 173, 0.3);
}

.btn:enabled:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(106, 13, 173, 0.4);
}

.btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

/* لینک */
.link {
    text-align: center;
    margin-top: 25px;
    color: var(--gray);
    font-size: 0.9rem;
}

.link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    position: relative;
}

.link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
}

.link a:hover::after {
    width: 100%;
}

/* رسپانسیو */
@media (max-width: 480px) {
    .signup-container {
        padding: 30px 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .logo-text {
        font-size: 1.4rem;
    }
}