* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, 
        rgba(74, 112, 83, 0.95) 0%, 
        rgba(58, 90, 66, 0.92) 50%,
        rgba(74, 123, 167, 0.88) 100%),
        url('../images/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Prevent image dragging */
img {
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Re-enable text selection in input fields */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Re-enable pointer events for interactive elements */
button,
a,
input,
textarea,
select,
label {
    pointer-events: auto;
}

.register-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 1100px;
    width: 100%;
    display: flex;
    min-height: 650px;
}

.register-left {
    flex: 0.6;
    background: linear-gradient(135deg, #4a7053 0%, #3a5a42 100%);
    padding: 60px 40px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.register-left h1 {
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: 700;
}

.register-left p {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 30px;
}

.features {
    margin-top: 20px;
    display: none;
}

.feature-item {
    display: none;
    align-items: center;
    margin-bottom: 15px;
    font-size: 15px;
}

.feature-item::before {
    content: '✓ ';
    margin-right: 12px;
    font-weight: bold;
}

.register-right {
    flex: 1.4;
    padding: 50px 50px;
    overflow-y: auto;
    max-height: 90vh;
    background: white;
}

.university-logo {
    width: 240px;
    height: auto;
    margin: 0 auto 30px;
    display: block;
}

.university-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.register-header {
    margin-bottom: 35px;
}

.register-header h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.register-header p {
    color: #666;
    font-size: 14px;
}

.register-header a {
    color: #4a7053;
    text-decoration: none;
    font-weight: 600;
}

.register-header a:hover {
    text-decoration: underline;
}

.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.input-wrapper {
    position: relative;
}

.input-group input[type="text"],
.input-group input[type="email"],
.input-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
}

.input-group input:focus {
    border-color: #4a7053;
    box-shadow: 0 0 0 3px rgba(74, 112, 83, 0.1);
}

.input-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #999;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 4px;
    border-radius: 4px;
}

.password-toggle:hover {
    color: #4a7053;
    background: rgba(74, 112, 83, 0.1);
}

.password-toggle svg {
    display: block;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s;
    flex: 1;
}

.radio-label:hover {
    border-color: #4a7053;
    background: rgba(74, 112, 83, 0.05);
}

.radio-label input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

.radio-label input[type="radio"]:checked {
    accent-color: #4a7053;
}

.radio-label input[type="radio"]:checked + span {
    color: #4a7053;
    font-weight: 600;
}

.checkbox-group {
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    cursor: pointer;
    accent-color: #4a7053;
}

.checkbox-label a {
    color: #4a7053;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.password-strength {
    margin-bottom: 20px;
}

.strength-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s;
    border-radius: 3px;
}

.strength-text {
    font-size: 12px;
    font-weight: 500;
    color: #666;
}

.register-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4a7053 0%, #3a5a42 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(74, 112, 83, 0.3);
}

.register-btn:active {
    transform: translateY(0);
}

.register-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: #999;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.divider::before {
    margin-right: 15px;
}

.divider::after {
    margin-left: 15px;
}

.google-signin-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.google-btn {
    width: 100%;
    padding: 14px;
    background: white;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.google-btn:hover {
    border-color: #4a7053;
    background: rgba(74, 112, 83, 0.05);
}

.google-icon {
    width: 20px;
    height: 20px;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
    border-left: 4px solid #c33;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
    border-left: 4px solid #3c3;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-large {
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h3 {
    color: #333;
    font-size: 24px;
    margin: 0;
}

.close-modal {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    color: #666;
    line-height: 1.6;
}

.modal-body h4 {
    color: #333;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 16px;
}

.modal-body p {
    margin-bottom: 15px;
    font-size: 14px;
}

.modal-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
}

.modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-btn-primary {
    background: linear-gradient(135deg, #4a7053 0%, #3a5a42 100%);
    color: white;
}

.modal-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 112, 83, 0.3);
}

@media (max-width: 768px) {
    .register-container {
        flex-direction: column;
        max-width: 500px;
    }

    .register-left {
        padding: 40px 30px;
    }

    .register-right {
        padding: 40px 30px;
        max-height: none;
    }

    .input-row {
        grid-template-columns: 1fr;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
}
/* ===================================== */
/* ENHANCED MOBILE IMPROVEMENTS */
/* ===================================== */

@media (max-width: 768px) {
    body {
        padding: 12px;
        align-items: flex-start;
        background-attachment: scroll; /* Fix iOS background-attachment fixed bug */
    }

    .register-container {
        flex-direction: column;
        border-radius: 16px;
        min-height: unset;
    }

    .register-left {
        padding: 28px 24px;
        flex: none;
    }

    .register-left h1 {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .register-left p {
        font-size: 14px;
        margin-bottom: 0;
    }

    .register-right {
        padding: 28px 24px;
        max-height: none;
        overflow-y: visible;
    }

    .university-logo {
        width: 180px;
        margin-bottom: 20px;
    }

    .register-header h2 {
        font-size: 22px;
    }

    .input-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Larger touch targets */
    .input-group input[type="text"],
    .input-group input[type="email"],
    .input-group input[type="password"] {
        font-size: 16px; /* Prevent iOS zoom */
        min-height: 48px;
        padding: 14px 16px;
    }

    .register-btn {
        min-height: 48px;
        font-size: 16px;
    }

    .google-btn {
        min-height: 48px;
        font-size: 15px;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .radio-label {
        padding: 14px 16px;
        min-height: 48px;
    }

    /* Password toggle bigger for touch */
    .password-toggle {
        padding: 10px;
        right: 8px;
        min-width: 44px;
        min-height: 44px;
    }

    .modal-content {
        width: calc(100% - 24px);
        padding: 24px 20px;
        max-height: 85vh;
        overflow-y: auto;
    }

    .modal-large {
        max-width: calc(100% - 24px);
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .register-left {
        padding: 24px 20px;
    }

    .register-right {
        padding: 24px 20px;
    }

    .register-header {
        margin-bottom: 24px;
    }

    .register-header h2 {
        font-size: 20px;
    }

    .input-group {
        margin-bottom: 18px;
    }
}




input, textarea, select, [contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}



img {
    -webkit-user-drag: none;
    pointer-events: none;
}

a img, button img {
    pointer-events: auto;
}
/* ===== CUSTOM FULL-WIDTH GOOGLE BUTTON ===== */
.google-btn-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    min-height: 50px;
}

/* Decorative custom button — visible, not clickable */
.custom-google-btn-full {
    width: 100%;
    padding: 14px 24px;
    background: #ffffff;
    color: #3c4043;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: inherit;
    min-height: 50px;
    position: relative;
    z-index: 1;
    pointer-events: none;
    box-sizing: border-box;
}

/* Invisible Google iframe on top — scaled to fill width, receives clicks */
.google-signin-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    opacity: 0.01;
    overflow: hidden;
}

.google-signin-hidden iframe {
    display: block;
    cursor: pointer !important;
}