@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300);

:root {
    --prim: #A69360; /* اللون الأساسي للنص والأزرار */
    --background-start: #F7F5EE; /* لون بداية التدرج للخلفية الكاملة */
    --background-end: #BFAD79; /* لون نهاية التدرج للخلفية الكاملة */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-weight: 300;
}

html, body {
    height: 100%; /* تأكد أن HTML و Body يملآن الشاشة */
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    color: var(--prim); /* استخدام المتغير */
    font-weight: 300;
    
    /* الخلفية الرئيسية التي تغطي كامل الشاشة */
    background: linear-gradient(to bottom right, var(--background-start) 0%, var(--background-end) 100%);
    
    /* لضمان توسيط محتوى الصفحة (الـ wrapper) إذا كان هناك محتوى خارج الـ wrapper */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* تأكد من أن body يأخذ كامل الارتفاع المرئي */
    overflow: hidden; /* لمنع ظهور أشرطة التمرير */
}

/* Placeholder styles */
::-webkit-input-placeholder {
    font-family: 'Source Sans Pro', sans-serif;
    color: white;
    font-weight: 300;
}
:-moz-placeholder {
    font-family: 'Source Sans Pro', sans-serif;
    color: white;
    opacity: 1;
    font-weight: 300;
}
::-moz-placeholder {
    font-family: 'Source Sans Pro', sans-serif;
    color: white;
    opacity: 1;
    font-weight: 300;
}
:-ms-input-placeholder {
    font-family: 'Source Sans Pro', sans-serif;
    color: white;
    font-weight: 300;
}

.wrapper {
    /* الـ wrapper أصبح الآن حاوية للعناصر الداخلية، ويمكنه أن يأخذ خلفية خاصة به */
    /* قم بإلغاء "position: absolute" و "top: 50%", "left: 0", "margin-top" لأن body سيتولى التوسيط */
    
    background-color: rgba(255, 255, 255, 0.1); /* لون شبه شفاف للخلفية لجعلها تظهر */
    border-radius: 10px; /* لإضافة بعض الجمالية للحواف */
    padding: 20px; /* لبعض المسافة الداخلية */

    width: 100%; /* تأكد أنه يأخذ عرضاً كافياً */
    max-width: 400px; /* أو أي عرض مناسب لشكل الـ form */
    height: auto; /* ليتكيف الارتفاع مع المحتوى */
    
    text-align: center; /* لتوسيط المحتوى داخله */
    
    /* إذا كنت تريد تأثير الفقاعات، يجب أن يكون الـ wrapper لديه overflow: hidden; */
    /* ومع ذلك، الفقاعات تحتاج لـ position: absolute/relative على العنصر الأب */
    /* إذا كانت الفقاعات جزءاً من الخلفية العامة، فستحتاج إلى طريقة مختلفة */
    
    /* ألغيت هذه الخصائص التي تسببت بالمشكلة مع توسيط body */
    /* position: absolute; */
    /* top: 50%; */
    /* left: 0; */
    /* margin-top: -200px; */
    overflow: hidden; /* للحفاظ على الفقاعات داخله إذا كانت له */
    
    /* الأهم: ستحتاج لتعيين ارتفاع محدد للـ wrapper أو التأكد من أن المحتوى يدفعه */
    min-height: 400px; /* إعادة ارتفاع تقريبي للحفاظ على الشكل */
}

/* تأكد أن هذا الجزء صحيح ليعمل */
.wrapper.form-success .container h1 {
    transform: translateY(85px);
}

.container {
    max-width: 600px; /* هذا ربما يحتاج لتعديل بناءً على عرض الـ wrapper */
    margin: 0 auto;
    padding: 80px 0;
    height: 400px; /* قد تحتاج لتعديل هذا الارتفاع أيضاً */
    text-align: center;
}

.container h1 {
    font-size: 40px;
    transition-duration: 1s;
    transition-timing-function: ease-in-out;
    font-weight:bolder;
}

form {
    padding: 20px 0;
    position: relative;
    z-index: 2;
}

form input {
    display: block;
    appearance: none;
    outline: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.2);
    width: 250px;
    border-radius: 3px;
    padding: 10px 15px;
    margin: 0 auto 10px auto;
    text-align: center;
    font-size: 20px;
    color: white;
    transition-duration: 0.25s;
    font-weight:bolder;
}

form input:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

form input:focus {
    background-color: white;
    width: 300px;
    color: var(--prim);
}

form button {
    appearance: none;
    outline: 0;
    background-color: white;
    border: 0;
    padding: 10px 15px;
    color: var(--prim);
    border-radius: 3px;
    width: 250px;
    cursor: pointer;
    font-size: 18px;
    transition-duration: 0.25s;
}

form button:hover {
    background-color: rgb(245, 247, 249);
}

.bg-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.bg-bubbles li {
    position: absolute;
    list-style: none;
    display: block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.15);
    bottom: -160px;
    
    -webkit-animation: square 25s infinite;
    animation: square 25s infinite;
    
    -webkit-transition-timing-function: linear;
    transition-timing-function: linear;
}

/* Specific bubble styling */
.bg-bubbles li:nth-child(1) { left: 10%; }
.bg-bubbles li:nth-child(2) { left: 20%; width: 80px; height: 80px; animation-delay: 1s; animation-duration: 8.5s; }
.bg-bubbles li:nth-child(3) { left: 25%; animation-delay: 4s; }
.bg-bubbles li:nth-child(4) { left: 40%; width: 60px; height: 60px; animation-duration: 11s; background-color: rgba(255, 255, 255, 0.25); }
.bg-bubbles li:nth-child(5) { left: 70%; }
.bg-bubbles li:nth-child(6) { left: 80%; width: 120px; height: 120px; animation-delay: 1.5s; background-color: rgba(255, 255, 255, 0.20); }
.bg-bubbles li:nth-child(7) { left: 32%; width: 160px; height: 160px; animation-delay: 3.5s; }
.bg-bubbles li:nth-child(8) { left: 55%; width: 20px; height: 20px; animation-delay: 7.5s; animation-duration: 20s; }
.bg-bubbles li:nth-child(9) { left: 25%; width: 10px; height: 10px; animation-delay: 1s; animation-duration: 20s; background-color: rgba(255, 255, 255, 0.30); }
.bg-bubbles li:nth-child(10) { left: 90%; width: 160px; height: 160px; animation-delay: 5.5s; }

/* Keyframes */
@-webkit-keyframes square {
    0%   { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-700px) rotate(600deg); }
}
@keyframes square {
    0%   { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-700px) rotate(600deg); }
}