* {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
}

/* ── UTHM Building Background with Dark Overlay ── */
body {
    background-image: url('../images/ptta_logo.png');
    background-size: cover;
    background-position: center-left;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    background-color: #1a1a2e;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 10, 25, 0.65) 0%, rgba(20, 30, 60, 0.75) 100%);
    z-index: 0;
    pointer-events: none;
}

/* Header / Topbar - Transparent Frosted Glass */
.topbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 20px 48px;
    background: rgba(80, 90, 120, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-image {
    height: 60px;
    width: auto;
    object-fit: contain;
    border-radius: 10px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-weight: 800;
    font-size: 22px;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 13px;
    color: #c0d0e0;
    font-weight: 500;
    margin-top: 2px;
}

/* Main Container */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    min-height: calc(100vh - 100px);
    position: relative;
    z-index: 1;
}

.register-wrapper {
    width: 100%;
    max-width: 550px;
}

/* Card - Transparent Frosted Glass */
.card {
    background: rgba(80, 90, 130, 0.35);
    padding: 48px;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: slideUp 0.6s ease-out;
}

h2 {
    text-align: center;
    margin: 0 0 8px 0;
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -1px;
}

.desc {
    text-align: center;
    font-size: 15px;
    color: #d0d8e8;
    margin-bottom: 32px;
    font-weight: 500;
}

/* Alert Styles */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 28px;
    border-left: 5px solid;
    animation: slideUp 0.5s ease-out;
}

.alert-danger {
    background-color: rgba(255, 107, 107, 0.15);
    border-color: #ff9999;
    color: #ff9999;
}

.alert-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 12px;
}

.alert-icon {
    font-size: 18px;
}

.error-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-list li {
    font-size: 14px;
    padding: 6px 0;
    font-weight: 500;
}

.error-list li:before {
    content: "✕ ";
    margin-right: 8px;
    font-weight: 700;
}

/* Form Group */
.form-group {
    margin-bottom: 24px;
}

label {
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
    font-weight: 700;
    color: #e0e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.required {
    color: #ff9999;
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-weight: 500;
}

.form-control::placeholder {
    color: #9ca8b8;
    font-weight: 400;
}

.form-control:focus {
    outline: none;
    border-color: #6db3f2;
    background-color: rgba(109, 179, 242, 0.15);
    box-shadow: 0 0 0 4px rgba(109, 179, 242, 0.2), inset 0 0 0 1px rgba(109, 179, 242, 0.3);
    color: #ffffff;
}

.form-control.is-invalid {
    border-color: #ff8787;
    background-color: rgba(255, 107, 107, 0.1);
    color: #ff8787;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.2), inset 0 0 0 1px rgba(255, 107, 107, 0.3);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-weight: 500;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
input[type="password"]::placeholder {
    color: #9ca8b8;
    font-weight: 400;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #6db3f2;
    background-color: rgba(109, 179, 242, 0.15);
    box-shadow: 0 0 0 4px rgba(109, 179, 242, 0.2), inset 0 0 0 1px rgba(109, 179, 242, 0.3);
    color: #ffffff;
}

input[type="text"]:disabled,
input[type="email"]:disabled,
input[type="tel"]:disabled,
input[type="password"]:disabled {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #8090a8;
    cursor: not-allowed;
    font-weight: 500;
}

/* Small text helper */
small {
    font-size: 13px;
    color: #b0c0d0;
    display: block;
    margin-top: 6px;
    font-weight: 500;
}

/* Error Messages */
.error-message {
    font-size: 13px;
    color: #ff9999;
    display: none;
    margin-top: 6px;
    font-weight: 600;
    animation: slideDown 0.3s ease-out;
}

.error-message:not(:empty) {
    display: block;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-control {
    padding-right: 48px;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca8b8;
    font-size: 18px;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #d0d8e8;
}

.toggle-password .show-icon {
    display: inline-block;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: #ff6b6b;
    border-radius: 3px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.form-control.strength-weak ~ .password-strength .strength-bar::after {
    width: 33%;
    background: #ff6b6b;
}

.form-control.strength-fair ~ .password-strength .strength-bar::after {
    width: 66%;
    background: #ffa500;
}

.form-control.strength-good ~ .password-strength .strength-bar::after {
    width: 100%;
    background: #51cf66;
}

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

/* Role Selection */
.role-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
}

.role-box {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-height: 120px;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.05);
}

.role-box input {
    display: none;
}

.role-box:hover {
    border-color: #6db3f2;
    background: rgba(109, 179, 242, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(109, 179, 242, 0.2);
}

.role-box:has(input[type="radio"]:checked) {
    border-color: #6db3f2;
    background: rgba(109, 179, 242, 0.25);
    box-shadow: 0 8px 20px rgba(109, 179, 242, 0.3);
}

.role-box:has(input[type="radio"]:checked) .icon {
    color: #6db3f2;
    transform: scale(1.1);
}

.role-box:has(input[type="radio"]:checked) span {
    color: #6db3f2;
    font-weight: 800;
}

.icon {
    width: 32px;
    height: 32px;
    color: #9ca8b8;
    transition: all 0.3s ease;
}

.role-box span {
    font-size: 15px;
    color: #e0e8f0;
    font-weight: 700;
    transition: color 0.3s ease;
}

/* Terms & Conditions */
.terms {
    margin: 28px 0;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.terms input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #6db3f2;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.terms input[type="checkbox"]:hover {
    box-shadow: 0 0 0 4px rgba(109, 179, 242, 0.2);
}

.terms label {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #d0d8e8;
    line-height: 1.5;
}

.terms a {
    color: #6db3f2;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
}

.terms a:hover {
    color: #9cc7f5;
    text-decoration: underline;
}

/* Buttons */
.btn-register {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    min-height: 52px;
    margin-top: 28px;
}

.btn-register:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 12px 35px rgba(37, 99, 235, 0.45);
    transform: translateY(-3px);
}

.btn-register:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Divider */
.divider {
    margin: 32px 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* Sign In Section */
.signin-section {
    text-align: center;
}

.signin-section p {
    color: #b0c0d0;
    font-size: 15px;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.signin-link {
    color: #6db3f2;
    text-decoration: none;
    font-weight: 800;
    font-size: 15px;
    transition: all 0.2s ease;
    display: inline-block;
}

.signin-link:hover {
    color: #9cc7f5;
    text-decoration: underline;
}

/* Security Note */
.security-note {
    margin-top: 28px;
    padding: 16px 20px;
    background: rgba(109, 179, 242, 0.15);
    border: 1px solid rgba(109, 179, 242, 0.3);
    border-radius: 10px;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    animation: slideUp 0.5s ease-out 0.2s both;
}

.security-icon {
    width: 24px;
    height: 24px;
    color: #6db3f2;
    flex-shrink: 0;
}

.security-note p {
    color: #9cc7f5;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

/* Footer */
.footer {
    background: rgba(80, 90, 120, 0.25);
    padding: 20px;
    text-align: center;
    color: #b0c0d0;
    font-size: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(15px);
}

.footer p {
    margin: 0;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .topbar {
        padding: 16px 24px;
    }

    .logo-image {
        height: 48px;
    }

    .logo-main {
        font-size: 20px;
    }

    .logo-subtitle {
        font-size: 12px;
    }

    .container {
        padding: 40px 16px;
        min-height: auto;
    }

    .card {
        padding: 40px 28px;
    }

    h2 {
        font-size: 28px;
    }

    .role-wrapper {
        grid-template-columns: 1fr;
    }

    .role-box {
        min-height: 90px;
    }
}

@media (max-width: 480px) {
    .topbar {
        padding: 14px 16px;
    }

    .logo-section {
        gap: 12px;
    }

    .logo-image {
        height: 40px;
    }

    .logo-main {
        font-size: 18px;
    }

    .logo-subtitle {
        font-size: 11px;
    }

    .container {
        padding: 20px 12px;
        min-height: auto;
    }

    .card {
        padding: 28px 18px;
        border-radius: 12px;
    }

    h2 {
        font-size: 24px;
    }

    .desc {
        font-size: 13px;
    }

    label {
        font-size: 13px;
    }

    .form-control {
        font-size: 16px;
    }

    .btn-register {
        font-size: 14px;
        padding: 12px 20px;
    }

    .alert-title {
        font-size: 14px;
    }

    .error-list li {
        font-size: 12px;
    }

    .footer {
        font-size: 12px;
        padding: 16px;
    }

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

/* Scroll Bar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(109, 179, 242, 0.4);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(109, 179, 242, 0.6);
}