:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #4895ef;
    --secondary: #7209b7;
    --accent: #f72585;
    --success: #4cc9f0;
    --light: #f8f9fa;
    --dark: #2b2d42;
    --gray: #8d99ae;
    --gray-light: #edf2f4;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-light: linear-gradient(
        135deg,
        var(--primary-light),
        var(--success)
    );
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.register-container {
    width: 100%;
    max-width: 1000px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    overflow: hidden;
    min-height: 700px;
}

.hero-section {
    background: var(--gradient);
    color: white;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section h1 {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.hero-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.features-list i {
    margin-left: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.form-section {
    padding: 2.5rem;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 2rem;
    text-align: center;
}

.form-header h2 {
    font-weight: 700;
    color: var(--dark);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--gray);
    font-size: 1rem;
}

.register-form {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.form-label i {
    margin-left: 0.5rem;
    color: var(--primary);
    font-size: 1rem;
}

.input-with-icon {
    position: relative;
}

.form-control,
.form-select {
    border-radius: 12px;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border: 2px solid var(--gray-light);
    transition: var(--transition);
    font-size: 1rem;
    height: auto;
    width: 100%;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    z-index: 5;
}

.input-with-icon .form-control,
.input-with-icon .form-select {
    padding-left: 3rem;
}

.password-toggle {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    z-index: 6;
}

.user-type-section {
    margin: 1.5rem 0;
}

.user-type-buttons {
    display: flex;
    gap: 10px;
    margin-top: 0.5rem;
}

.user-type-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-weight: 500;
}

.user-type-btn:hover {
    border-color: var(--primary);
}

.user-type-btn.active {
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
}

.student-fields {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 1rem;
    border-left: 4px solid var(--primary);
    display: none;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 1rem 0;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
}

.dormitory-fields {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid var(--gray-light);
    display: none;
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.login-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.login-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

.is-invalid {
    border-color: var(--accent) !important;
}

.invalid-feedback {
    color: var(--accent);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.floating-shapes div {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 15s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }

    100% {
        transform: translateY(0) rotate(360deg);
    }
}

@media (max-width: 992px) {
    .register-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .hero-section {
        display: none;
    }
}

@media (max-width: 576px) {
    .form-section {
        padding: 2rem 1.5rem;
    }

    .user-type-buttons {
        flex-direction: column;
    }
}

/* input type number اخفاء الاسهم الموجودة في */
/* Chrome, Safari, Edge */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type="number"] {
    -moz-appearance: textfield;
}

/* IE/Edge */
input[type="number"]::-ms-clear {
    display: none;
    width: 0;
    height: 0;
}