/* Registro Page Styles */

.registro-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px 0;
}

/* Background */
.registro-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/landback.jpg');
    background-size: cover;
    background-position: center;
    z-index: -2;
}

.registro-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.95) 0%, rgba(26, 41, 66, 0.92) 100%);
    z-index: -1;
}

/* Container */
.registro-container {
    width: 100%;
    max-width: 900px;
    padding: 20px;
    position: relative;
    z-index: 1;
    margin: auto;
}

/* Back Button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 24px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-4px);
}

.back-button svg {
    width: 20px;
    height: 20px;
}

/* Registration Card */
.registro-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.6s ease-out;
    max-height: none;
    overflow: visible;
}

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

/* Logo */
.registro-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.registro-logo .logo-icon {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.registro-logo .logo-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark-bg);
}

/* Title */
.registro-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark-bg);
    text-align: center;
    margin-bottom: 8px;
}



.registro-subtitle {
    font-size: 16px;
    color: #64748B;
    text-align: center;
    margin-bottom: 32px;
}

/* Form */
.registro-form {
    width: 100%;
}

/* Generic form styles for new registration pages */
.form { width: 100%; }
.form-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.form-grid.two-cols { grid-template-columns: 1fr 1fr; }
.form-grid.three-cols { grid-template-columns: repeat(3, 1fr); }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { display: block; font-size: 14px; font-weight: 600; color: #334155; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--dark-bg);
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #FF6B00;
  background: white;
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.1);
}
.form-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }
.fieldset { border: 1px dashed #E2E8F0; border-radius: 12px; padding: 14px; background: #fff; }
.fieldset-title { font-weight: 700; color: #334155; margin-bottom: 8px; font-size: 14px; }

/* Message Container */
.message-container {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
}

.message-container.success {
    background: rgba(0, 204, 102, 0.1);
    border: 1px solid rgba(0, 204, 102, 0.3);
    color: #00CC66;
}

.message-container.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--dark-bg);
    background: #F8FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #FF6B00;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.1);
}

.form-input::placeholder {
    color: #94A3B8;
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748B;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

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

.toggle-password .eye-icon {
    width: 20px;
    height: 20px;
}

/* Select Arrow */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px 24px;
    background: #FF6B00;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    margin-top: 8px;
    font-family: 'Inter', sans-serif;
}

.btn-submit:hover {
    background: #FF8533;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 0, 0.3);
}

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

.btn-submit:disabled {
    background: #94A3B8;
    cursor: not-allowed;
    transform: none;
}

.btn-submit .btn-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn-submit:hover .btn-arrow {
    transform: translateX(4px);
}

/* Loading State */
.btn-submit.loading {
    pointer-events: none;
}

.btn-submit.loading .btn-text {
    opacity: 0.6;
}

.btn-submit.loading .btn-arrow {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Login Link */
.login-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #64748B;
}

.login-link a {
    color: #FF6B00;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: color 0.3s ease;
}

.login-link a:hover {
    color: #FF8533;
    text-decoration: underline;
}

/* Form Validation */
.form-input.error,
.form-select.error {
    border-color: #EF4444;
}

.form-input.error:focus,
.form-select.error:focus {
    border-color: #EF4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-input.success,
.form-select.success {
    border-color: #00CC66;
}

.error-message {
    display: block;
    color: #EF4444;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .registro-card {
        padding: 32px 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* En pantallas pequeñas, apilar todas las grillas de dos y tres columnas */
    .form-grid.two-cols,
    .form-grid.three-cols {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .registro-title {
        font-size: 28px;
    }
    
    .back-button {
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .registro-container {
        padding: 12px;
    }
    
    .registro-card {
        padding: 24px 20px;
        border-radius: 16px;
    }
    
    .registro-title {
        font-size: 24px;
    }
    
    .registro-subtitle {
        font-size: 14px;
    }
    
    .form-input,
    .form-select {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .btn-submit {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Accessibility */
.form-input:focus-visible,
.form-select:focus-visible,
.btn-submit:focus-visible,
.toggle-password:focus-visible {
    outline: 2px solid #FF6B00;
    outline-offset: 2px;
}

/* Login Page Specific Styles */
.login-title {
    font-size: 32px;
    font-weight: 800;
    color: #2D5F3F;
    text-align: center;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 16px;
    color: #64748B;
    text-align: center;
    margin-bottom: 32px;
}

/* Password Label Row */
.password-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.forgot-password-link {
    font-size: 14px;
    color: #0066FF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: #0052CC;
    text-decoration: underline;
}

/* Green Submit Button for Login */
.btn-submit-green {
    background: #2D5F3F;
}

.btn-submit-green:hover {
    background: #3A7A52;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 95, 63, 0.3);
}

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

/* Orange Register Link */
.register-link-orange {
    color: #FF6B00;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: color 0.3s ease;
}

.register-link-orange:hover {
    color: #FF8533;
    text-decoration: underline;
}

/* Role selection */
.role-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 18px;
    justify-content: center;
    align-items: stretch;
    margin-top: 16px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}
.role-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: linear-gradient(145deg, #ffffff, #f9fafb);
    border: 1px solid #E2E8F0;
    border-radius: 22px;
    padding: 14px 14px 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    text-decoration: none;
    color: inherit;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    cursor: pointer;
}
.role-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
    border-color: #cbd5e1;
}
.role-card:active { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15,23,42,.12); }
.role-card:focus-visible { outline: 3px solid #FF6B00; outline-offset: 3px; border-radius: 24px; }
.role-image {
    width: 100%;
    height: clamp(80px, 11vw, 110px);
    border-radius: 12px;
    background-size: cover;
    background-position: center;
}
.role-image-player { background-image: url('../images/rugby-player.jpg'); }
.role-image-coach { background-image: url('../images/rugby-coach.jpg'); }
.role-image-frame {
    width:100%;
    height: clamp(70px, 10vw, 100px);
    border-radius:22px;
    background: radial-gradient(circle at 0% 0%, #1e293b, #020617);
    border:2px solid #020617;
    padding:4px;
    box-shadow:0 8px 22px rgba(15,23,42,.45);
    overflow:hidden;
}
.role-img {
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center;
    display:block;
    border-radius:16px;
}
.role-label {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #1f2933;
}

@media (max-width: 540px) {
    .role-options { grid-template-columns: 1fr; max-width: 360px; gap: 14px; }
    .role-card { width: 100%; padding: 12px 12px 14px; }
}
