/* ────────────────────────────────────────────
   register.css
   Place in: src/main/resources/static/css/
──────────────────────────────────────────── */

/* ── Reset & Base ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow-x: hidden;
    padding: 2rem 0;
}

/* ── Animated background dots ── */
body::before {
    content: '';
    position: fixed;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    pointer-events: none;
}

@keyframes moveBackground {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* ── Floating shapes ── */
.shape {
    position: fixed;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

.shape:nth-child(1) { width: 80px;  height: 80px;  top: 10%; left: 10%; animation-delay: 0s; }
.shape:nth-child(2) { width: 120px; height: 120px; top: 70%; left: 80%; animation-delay: 2s; }
.shape:nth-child(3) { width: 60px;  height: 60px;  top: 40%; left: 5%;  animation-delay: 4s; }
.shape:nth-child(4) { width: 90px;  height: 90px;  top: 20%; left: 75%; animation-delay: 1s; }
.shape:nth-child(5) { width: 50px;  height: 50px;  top: 80%; left: 20%; animation-delay: 3s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(-30px) rotate(180deg); }
}

/* ── Card container ── */
.register-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 660px;
    padding: 20px;
}

.register-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Logo ── */
.logo-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.05); }
}

.logo-icon i {
    font-size: 32px;
    color: #fff;
}

/* ── Headings ── */
h1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 26px;
    margin-bottom: 6px;
}

.subtitle {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 24px;
}

/* ── CR Badge ── */
.cr-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.12));
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    letter-spacing: 0.4px;
    margin-bottom: 12px;
}

/* ── Section divider label ── */
.section-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #adb5bd;
    margin: 1.2rem 0 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e9ecef;
}

/* ── Alerts ── */
.alert {
    border: none;
    border-radius: 12px;
    font-size: 0.88rem;
    animation: slideDown 0.4s ease-out;
}

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

.alert-success { background: #d1f5e0; color: #1a7a42; }
.alert-danger  { background: #ffe0e3; color: #c0392b; }

/* ── Form labels ── */
.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.35rem;
}

/* ── Input icon wrapper ── */
.input-wrap {
    position: relative;
}

.input-wrap .input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 0.9rem;
    pointer-events: none;
}

/* ── Inputs ── */
.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 11px 40px 11px 16px;
    font-size: 0.9rem;
    height: 48px;
    transition: all 0.3s ease;
    color: #343a40;
    background-color: #fff;
}

.form-select { padding-right: 2.25rem; }

.form-control::placeholder { color: #ced4da; }

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* ── Password strength bar ── */
.strength-bar-wrap {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.4s, background 0.4s;
}

.strength-text {
    font-size: 0.73rem;
    margin-top: 3px;
    color: #adb5bd;
    min-height: 16px;
}

/* ── Submit button ── */
.btn-register {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 16px;
    color: #fff;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 0.75rem;
    cursor: pointer;
}

.btn-register::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.btn-register:hover::before { left: 100%; }

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    color: #fff;
}

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

/* ── Sign-in link ── */
.signin-link {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 1.25rem;
    margin-bottom: 0;
}

.signin-link a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.signin-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 576px) {
    .register-card { padding: 32px 22px; }
    h1 { font-size: 22px; }
}