/* ================================
   iOS 18/17 Professional Theme 
   Registration Form
   ================================ */
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
/* ---------- Global Reset ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---------- CSS Variables ---------- */
:root {
    --primary: #ff6b35;
    --primary-light: #ff8c5f;
    --secondary: #1a936f;
    --secondary-light: #2bb58d;
    --accent: #114b5f;
    --accent-light: #1c6a8a;
    --light: #f9f7f3;
    --dark: #2a2d34;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --ios-bg: #f2f2f7;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --primary-grad: linear-gradient(135deg, #ff6b35 0%, #ff9f1c 100%);
    --accent-blue: #007aff;
    --sidebar-width: 280px;
    --ios-red: #ff3b30;
    --ios-green: #34c759;
    --ios-gray: #8e8e93;
    --ios-light-gray: #e5e5ea;
    --ios-dark: #1c1c1e;
    --ios-card-bg: rgba(255, 255, 255, 0.9);
    --ios-blur: blur(20px);
}

/* ---------- Body ---------- */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--ios-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: var(--dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* منع السكروول الأفقي */
}

/* ---------- Container ---------- */
.container {
    width: 500px;
    max-width: 100%;
}

/* ---------- App Screen ---------- */
.app-screen {
    width: 500px;
    max-width: 100%;
    margin: 0 auto;
    background: transparent;
    border-radius: 2.5rem;
    overflow: hidden;
    backdrop-filter: var(--ios-blur);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.3);
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- iOS Card ---------- */
.ios-card {
    background: var(--ios-card-bg);
    backdrop-filter: var(--ios-blur);
    border-radius: 1.5rem;
    margin: 0;
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--glass-border);
}

/* ---------- App Header ---------- */
.app-header {
    text-align: center;
    margin-bottom: 2rem;
}

.app-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 10px rgba(255, 107, 53, 0.3));
}

.app-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.app-header p {
    color: var(--ios-gray);
    font-size: 0.95rem;
    font-weight: 400;
}

/* ---------- Form Sections ---------- */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-bottom: 2rem;
}

.ios-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ---------- Input Fields ---------- */
.input-field {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--ios-light-gray);
    border-radius: 1.2rem;
    padding: 0 1rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.input-field i {
    font-size: 1.2rem;
    color: var(--ios-gray);
    transition: color 0.3s ease;
    min-width: 1.5rem;
    text-align: center;
}

.input-field input,
.input-field select {
    width: 100%;
    padding: 0.9rem 0.5rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-family: inherit;
    color: var(--dark);
    outline: none;
}

.input-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
    padding-right: 2rem;
}

.input-field:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.02);
    background: white;
}

.input-field:focus-within i {
    color: var(--primary);
}

.input-field.no-border {
    border-color: var(--ios-light-gray);
}

/* ---------- Visibility Button ---------- */
.visibility-btn {
    background: transparent;
    border: none;
    color: var(--ios-gray);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    margin-left: 0.25rem;
}

.visibility-btn:hover {
    color: var(--primary);
}

.visibility-btn:focus {
    outline: none;
}

/* ---------- Primary Button ---------- */
.ios-primary-btn {
    background: var(--primary-grad);
    border: none;
    border-radius: 1.5rem;
    padding: 1rem;
    width: 100%;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
    letter-spacing: 0.3px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 0.5rem;
}

.ios-primary-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 28px rgba(255, 107, 53, 0.4);
}

.ios-primary-btn:active {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

/* ---------- App Footer ---------- */
.app-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--ios-gray);
    font-size: 0.95rem;
}

.app-footer .link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    position: relative;
}

.app-footer .link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--primary-grad);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.app-footer .link:hover::after {
    transform: scaleX(1);
}

/* ---------- Toast Notifications ---------- */
.ios-notification-container {
    padding: 0.5rem 0 1rem;
    max-width: 450px;
    margin: 0 auto;
    position: absolute;
    display: flex;
    flex-direction: column !important;
    justify-content: center;
    top: 10px;
    left: 35%;
}

.ios-toast {
    display: flex;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 1.2rem;
    margin-bottom: 0.75rem;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark);
    animation: toastSlide 0.3s ease-out;
    z-index: 10001;
}

.ios-toast.error {
    background: rgba(255, 59, 48, 0.15);
    border-color: rgba(255, 59, 48, 0.3);
    color: #c41e1e;
}

.ios-toast i {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.ios-toast.error i {
    color: var(--ios-red);
}

@keyframes toastSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive (Mobile) ---------- */
@media (max-width: 480px) {
    .container {
        width: 100%;
    }

    .app-screen {
        width: 100%;
        border-radius: 2rem;
    }

    .ios-card {
        padding: 1.25rem;
    }

    .app-header h2 {
        font-size: 1.6rem;
    }

    .input-field input,
    .input-field select {
        padding: 0.8rem 0.5rem;
    }

    .ios-notification-container {
        left: 5%; /* تحريك الإشعارات لتتناسب مع الهاتف */
        top: 10px;
        width: 90%;
    }
}