* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    perspective: 1500px;
    background: linear-gradient(180deg, #FEFAEA, #C3CEA1, #606C38, #8D7053, #4D3D2D);
    background-size: 100% 400%;
    animation: bgFlow 35s ease-in-out infinite;
    transition: transform 0.25s;
}

/* ================= الكارد ================= */
.register-container {
    background: rgba(254, 250, 234, 0.2);
    backdrop-filter: blur(35px);
    border-radius: 40px;
    padding: 50px 40px;
    text-align: center;
    width: 100%;
    max-width: 650px;
    box-shadow:
        0 40px 90px rgba(77, 61, 45, 0.55),
        inset 0 0 40px rgba(254,250,234,0.1);
    transition: 1s;
    animation: softEnter 1.2s ease-out;
}

.register-container:hover {
    transform: translateY(-4px);
    box-shadow:
        0 50px 100px rgba(77, 61, 45, 0.6),
        inset 0 0 40px rgba(254,250,234,0.12);
}

.register-container h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #4D3D2D;
    animation: textEnter 1.5s ease forwards;
}

.register-container pre {
    font-size: 1rem;
    margin-bottom: 20px;
    color: #4D3D2D;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.form-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.register-container input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 15px;
    background-color: rgba(255,255,255,0.6);
    color: #333;
}

.btn {
    padding: 18px 50px;
    border-radius: 60px;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #FEFAEA;
    background-size: 400% 400%;
    animation: btnFlow 7s ease infinite;
    transition: transform 0.5s, box-shadow 0.5s;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    margin-top: 10px;
}

@keyframes btnFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.register-btn {
    background-image: linear-gradient(45deg, #606C38, #8D7053, #4D3D2D, #606C38);
}

.login-btn {
    background-image: linear-gradient(45deg, #C3CEA1, #606C38, #8D7053, #C3CEA1);
}

.btn:hover {
    transform: scale(1.1) rotateZ(1deg);
    box-shadow: 0 0 60px rgba(77, 61, 45, 0.85), 0 0 30px rgba(254,250,234,0.25);
}

.btn:active {
    transform: scale(0.95) rotateZ(-1deg);
    box-shadow: 0 5px 20px rgba(77,61,45,0.6);
}

.alert {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 10px;
    font-weight: bold;
}

.alert.success { background-color: #81b29a; color: white; }
.alert.error   { background-color: #e07a5f; color: white; }

/* ================= Confirm & Notification ================= */

#notification, #confirmBar {
    position: fixed;
    top: 20px;
    right: 50%;
    transform: translateX(50%);
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    z-index: 10000;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    max-width: 90%;
}

#notification {
    padding: 12px 20px;
    color: #f4f1de;
    opacity: 0;
    pointer-events: none;
}
#notification.show {
    opacity: 1;
    pointer-events: auto;
}

#confirmBar {
    display: none;
    gap: 10px;
    background-color: #0B76A0;
    color: #f4f1de;
    padding: 12px 20px;
}

#confirmBar span { flex: 1; }

#confirmBar button {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

#confirmYesBtn { background-color: #4CAF50; color: #fff; }
#confirmNoBtn  { background-color: #e53935; color: #fff; }

#confirmBar button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* ================= Overlay OTP ================= */
.otp-overlay {
    position: fixed;
    top:0; left:0;
    width:100%; height:100%;
    background: rgba(0,0,0,0.5);
    display:none;
    justify-content:center;
    align-items:center;
    z-index: 10000;
    backdrop-filter: blur(15px);
}


.otp-card h3 {
    margin-bottom: 25px;
}
.otp-card.otp-timer-card {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(35px);
    border-radius: 30px;
    padding: 50px 30px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    color: #ffffff;
    box-shadow:
        0 50px 100px #ccc(233, 232, 228, 0.12);
    border: none; /* إزالة البوردر */
    position: relative;
}

.otp-close-btn {
    position: absolute;
    top: 8px;
    left: 13px;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
}

.otp-close-btn {
    transform: scale(1.1);
}

.otp-inputs {
    display:flex;
    gap:10px;
    justify-content:center;
    margin-bottom:20px;
}

.otp-box {
    width:40px;
    height:50px;
    font-size: 24px;
    text-align:center;
    border-radius:8px;
    border:1px solid #ccc;
    background-color: rgba(255,255,255,0.6);
    outline:none;
}

.otp-timer {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #ffffff;
}

.otp-buttons {
    display:flex;
    justify-content:space-around;
    gap:12px;
}

.otp-buttons button {
    padding:12px 20px;
    border-radius:14px;
    font-size:16px;
    border:none;
    cursor:pointer;
    color:#fff;
    background: linear-gradient(45deg,#386641,#6a994e);
    background-size:400% 400%;
    animation: btnFlow 7s ease infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.otp-buttons button:hover {
    transform: scale(1.05);
    box-shadow:0 10px 25px rgba(0, 0, 0, 0.35);
}

.otp-buttons button:active { transform: scale(0.95); }

.otp-card .otp-error {
    color: #e53935; /* أحمر واضح */
    font-weight: bold;
    margin-top: 15px;
    display: none; /* تبقى مخفية حتى تظهر عند الخطأ */
    text-shadow: 0 1px 2px rgba(0,0,0,0.5); /* تجعل النص أوضح فوق الخلفية الضبابية */
    z-index: 1;
}




@media screen and (max-width: 500px){
    .otp-box { width:35px; height:45px; font-size:20px; }
    .otp-card.otp-timer-card { padding:40px 20px; }
}



@media screen and (max-width: 650px) {
    .register-container { padding: 40px 25px; }
    .form-row { flex-direction: column; }
    .register-container h1 { font-size: 2rem; }
    .btn { padding: 15px 40px; font-size: 1rem; }
}
