/* Abhyudaya Youth Club Registration Form Styles */

:root {
    --primary: #ff5d00;
    --primary-dark: #e05400;
    --primary-light: #ff7d33;
    --navy: #072449;
    --navy-dark: #021226;
    --navy-light: #0a2f5a;
    --white: #ffffff;
    --text-dark: #08152b;
    --text-muted: #5a6a85;
    --border: #e0e7f0;
    --border-focus: #ff5d00;
    --success: #27ae60;
    --error: #e74c3c;
    --bg-light: #f8f9fa;
    --shadow: 0 4px 20px rgba(7, 36, 73, 0.15);
    --shadow-lg: 0 10px 40px rgba(7, 36, 73, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Global rule to prevent horizontal overflow */
img, svg, video, iframe {
    max-width: 100%;
    height: auto;
}

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, rgba(7, 36, 73, 0.95) 0%, rgba(4, 19, 41, 0.98) 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Background decorative elements */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 93, 0, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 93, 0, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(7, 36, 73, 0.3) 0%, transparent 70%),
        linear-gradient(135deg, rgba(7, 36, 73, 0.95) 0%, rgba(4, 19, 41, 0.98) 100%);
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255, 255, 255, 0.02) 35px, rgba(255, 255, 255, 0.02) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(255, 255, 255, 0.02) 35px, rgba(255, 255, 255, 0.02) 70px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
    overflow: hidden;
}

.registration-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    position: relative;
    z-index: 1;
    overflow: visible;
    /* Prevent any scrollbar from appearing on this container */
    height: auto;
}

/* Header with Branding */
.registration-header {
    background: var(--white);
    border-radius: 12px 12px 0 0;
    padding: 25px 30px;
    box-shadow: var(--shadow);
    margin-bottom: 0;
    position: relative;
    z-index: 2;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

.back-button:hover {
    color: var(--primary);
    background: rgba(255, 93, 0, 0.08);
}

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

.brand-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-info {
    flex: 1;
}

.brand-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.brand-tagline {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
    font-weight: 400;
}

/* Form Wrapper */
.form-wrapper {
    background: var(--white);
    border-radius: 0 0 12px 12px;
    padding: 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    /* Prevent any scrollbar from appearing on this wrapper */
    height: auto;
}

/* Dashboard Header */
.dashboard-header {
    padding: 40px 50px 30px;
    background: linear-gradient(135deg, rgba(255, 93, 0, 0.05) 0%, rgba(7, 36, 73, 0.02) 100%);
    border-bottom: 2px solid #f0f0f0;
}

.dashboard-title-section {
    text-align: center;
    margin-bottom: 30px;
}

.form-title {
    color: var(--navy);
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.form-subtitle {
    color: var(--primary);
    margin-bottom: 0;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e7f0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 93, 0, 0.3);
}

.step-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.progress-line {
    flex: 1;
    height: 3px;
    background: #e0e7f0;
    border-radius: 2px;
    margin-top: -20px;
}

/* Dashboard Cards */
.dashboard-card {
    margin: 30px 50px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    overflow: visible;
    transition: all 0.3s ease;
    width: calc(100% - 100px);
    max-width: 100%;
}

.dashboard-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.card-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, rgba(255, 93, 0, 0.08) 0%, rgba(7, 36, 73, 0.03) 100%);
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.card-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.card-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 93, 0, 0.25);
    flex-shrink: 0;
}

.card-icon {
    color: white;
    width: 28px;
    height: 28px;
    display: block;
    flex-shrink: 0;
}

.card-title {
    color: var(--navy);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
}

.card-badge {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.players-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.players-badge .min-requirement {
    font-size: 11px;
    opacity: 0.9;
    font-weight: 500;
}

.card-content {
    padding: 30px;
    overflow: visible;
}

#players-container {
    overflow: visible;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 100%;
}

.form-grid-item {
    display: flex;
    flex-direction: column;
}

.form-grid-item.full-width {
    grid-column: 1 / -1;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.2px;
    line-height: 1.4;
}

.form-label svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
    flex-shrink: 0;
}

.form-input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background-color: var(--white);
    color: var(--text-dark);
    letter-spacing: 0.3px;
}

.form-input::placeholder {
    color: #b0b0b0;
    text-transform: none;
    font-weight: 400;
}

input[type="text"].form-input:not([name*="aadhaar_card"]):not(#mobile_no),
select.form-input {
    text-transform: uppercase;
}

input[type="text"][name*="aadhaar_card"],
input[type="tel"].form-input,
input[type="date"].form-input,
#mobile_no {
    text-transform: none;
    letter-spacing: 1px;
}

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

/* Player Cards */
.player-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid #e0e7f0;
    transition: all 0.3s ease;
    position: relative;
}

.player-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(255, 93, 0, 0.15);
    background: white;
    transform: translateY(-2px);
}

.player-card .form-grid {
    margin-top: 0;
}

.player-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8e8e8;
    gap: 15px;
}

.player-number-badge {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 93, 0, 0.25);
}

.btn-remove-player {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
    vertical-align: middle;
}

.btn-remove-player:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-remove-player svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Add Player Section */
.add-player-section {
    text-align: center;
    margin-top: 20px;
}

.btn-add-player {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1;
}

.btn-add-player:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 93, 0, 0.4);
}

.btn-add-player:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-add-player svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.2px;
}

.required {
    color: var(--error);
    margin-left: 3px;
    font-weight: 600;
}

.optional-text {
    color: var(--text-muted);
    margin-left: 3px;
    font-weight: 400;
    font-size: 12px;
    font-style: italic;
}

/* Input Fields */
input[type="text"],
input[type="tel"],
input[type="date"],
select {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background-color: var(--white);
    color: var(--text-dark);
    letter-spacing: 0.3px;
}

/* Apply uppercase only to text fields (not Aadhaar, contact, or date) */
input[type="text"]:not(#aadhaar_card),
select {
    text-transform: uppercase;
}

/* Aadhaar, contact, and date should remain as entered */
#aadhaar_card,
#player_contact,
input[type="date"] {
    text-transform: none;
}

/* Aadhaar and contact should have number spacing */
#aadhaar_card,
#player_contact {
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(255, 93, 0, 0.1);
    background-color: var(--white);
}

/* Date Input Wrapper */
.date-input-wrapper {
    position: relative;
    width: 100%;
}

.date-input {
    width: 100%;
    padding-right: 50px;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
}

.date-input::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 16px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0;
    z-index: 2;
}

.date-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    z-index: 1;
    transition: color 0.3s ease;
}

.date-input-wrapper:focus-within .date-icon {
    color: var(--primary);
}

.date-input-wrapper.has-value .date-icon {
    color: var(--primary);
}

.date-input:hover {
    border-color: var(--text-muted);
}

.date-input:focus {
    border-color: var(--border-focus);
}

.date-input-wrapper:hover .date-icon {
    color: var(--primary);
    transition: color 0.3s ease;
}

/* Modern Date Picker Styling */
input[type="date"] {
    position: relative;
}

input[type="date"]::-webkit-datetime-edit {
    padding: 0;
    color: var(--text-dark);
    font-weight: 500;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

input[type="date"]::-webkit-datetime-edit-text {
    color: var(--text-muted);
    padding: 0 4px;
}

input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
    color: var(--text-dark);
    padding: 0 2px;
}

input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus {
    background-color: rgba(255, 93, 0, 0.1);
    border-radius: 4px;
    color: var(--primary);
}

input[type="date"]::-webkit-inner-spin-button {
    display: none;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    cursor: pointer;
}

/* Firefox Date Picker */
input[type="date"]::-moz-placeholder {
    color: var(--text-muted);
}

/* Custom date picker styling for better appearance */
@media (min-width: 768px) {
    input[type="date"] {
        background-image: none;
    }
}

/* Enhanced date picker appearance */
.date-input-wrapper {
    display: flex;
    align-items: center;
}

.date-input {
    flex: 1;
}

/* Style the date picker calendar popup (browser-specific) */
input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

/* Improve date input appearance on different browsers */
input[type="date"] {
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
}

input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-clear-button {
    display: none;
    -webkit-appearance: none;
}

/* Add smooth transitions */
.date-input-wrapper {
    transition: all 0.3s ease;
}

.date-input-wrapper:hover {
    transform: translateY(-1px);
}

.date-input-wrapper:focus-within {
    transform: translateY(-1px);
}

/* Mobile date picker improvements */
@media (max-width: 768px) {
    .date-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .date-icon {
        width: 18px;
        height: 18px;
        right: 14px;
    }
}

input[type="text"]:disabled,
input[type="tel"]:disabled,
select:disabled {
    background-color: var(--bg-light);
    cursor: not-allowed;
    opacity: 0.7;
}

select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23072549' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px;
    position: relative;
    z-index: 1;
}

select::-ms-expand {
    display: none;
}

select:focus {
    z-index: 2;
}

select option {
    padding: 12px;
    background: var(--white);
    color: var(--text-dark);
    text-transform: uppercase;
}

.help-text {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 400;
}

/* Error Messages */
.error-message {
    display: block;
    color: var(--error);
    font-size: 12px;
    margin-top: 6px;
    font-weight: 500;
    min-height: 18px;
}

.error-message:empty {
    display: none;
}

input.error,
select.error {
    border-color: var(--error);
    background-color: #fff5f5;
}

input.error:focus,
select.error:focus {
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}

input.valid,
select.valid {
    border-color: var(--success);
}

input.valid:focus,
select.valid:focus {
    box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.1);
}

/* Dashboard Actions */
.dashboard-actions {
    display: flex;
    gap: 15px;
    padding: 30px 50px;
    background: #f8f9fa;
    border-top: 2px solid #e8e8e8;
    justify-content: center;
}

button {
    padding: 15px 32px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    justify-content: center;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 93, 0, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 93, 0, 0.4);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

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

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-submit svg,
.btn-reset svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-reset {
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid var(--border);
}

.btn-reset:hover {
    background: var(--bg-light);
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

/* Form Messages */
.form-message {
    margin-top: 25px;
    padding: 16px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    display: none;
    line-height: 1.5;
}

.form-message.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.form-message.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* Unique Number Display */
.unique-number-display {
    margin-top: 25px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 93, 0, 0.08) 0%, rgba(255, 93, 0, 0.03) 100%);
    border: 2px solid var(--primary);
    border-radius: 12px;
    text-align: center;
    animation: slideDown 0.4s ease-out;
}

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

.unique-number-content h3 {
    color: var(--navy);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.unique-number-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--white);
    padding: 18px 24px;
    border-radius: 8px;
    border: 2px solid var(--primary);
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(255, 93, 0, 0.15);
}

#unique-number-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}

.copy-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn svg {
    stroke: currentColor;
}

.unique-number-note {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
    font-style: italic;
}

.btn-print-pdf {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 93, 0, 0.3);
}

.btn-print-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 93, 0, 0.4);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

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

.btn-print-pdf svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .unique-number-display {
        padding: 20px;
    }
    
    .unique-number-value {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    #unique-number-text {
        font-size: 20px;
        word-break: break-all;
    }
    
    .copy-btn {
        width: 100%;
        padding: 10px;
    }
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.registration-footer {
    text-align: center;
    padding: 25px 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.registration-footer p {
    margin: 0;
}

/* Decorative shapes in background */
.registration-container::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 93, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.registration-container::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(7, 36, 73, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .registration-container {
        padding: 10px;
        min-height: auto;
    }

    .registration-header {
        padding: 15px;
        border-radius: 12px;
        margin-bottom: 15px;
    }

    .back-button {
        font-size: 12px;
        padding: 6px 10px;
        margin-bottom: 10px;
    }

    .brand-section {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .brand-logo {
        width: 50px;
        height: 50px;
    }

    .brand-name {
        font-size: 18px;
    }

    .brand-tagline {
        font-size: 10px;
    }

    .form-wrapper {
        padding: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .dashboard-header {
        padding: 20px 15px 15px;
    }

    .form-title {
        font-size: 20px;
        line-height: 1.3;
        margin-bottom: 5px;
    }

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

    .progress-indicator {
        margin-top: 20px;
        gap: 10px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .step-label {
        font-size: 10px;
        margin-top: 5px;
    }

    .progress-line {
        margin-top: -17px;
    }

    .dashboard-card {
        margin: 15px;
        border-radius: 12px;
        width: calc(100% - 30px);
        max-width: 100%;
    }

    .card-header {
        padding: 20px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .card-header-left {
        width: 100%;
        gap: 15px;
    }

    .card-icon-wrapper {
        width: 48px;
        height: 48px;
    }

    .card-icon {
        width: 24px;
        height: 24px;
    }

    .card-title {
        font-size: 18px;
    }

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

    .card-badge {
        font-size: 11px;
        padding: 6px 12px;
        align-self: flex-end;
    }

    .card-content {
        padding: 20px 15px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-grid-item.full-width {
        grid-column: 1;
    }

    .form-label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .form-label svg {
        width: 14px;
        height: 14px;
    }

    .form-input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 8px;
    }

    .player-card {
        padding: 20px 15px;
        margin-bottom: 15px;
    }

    .player-card-header {
        margin-bottom: 20px;
        padding-bottom: 12px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .player-number-badge {
        font-size: 13px;
        padding: 6px 14px;
    }

    .btn-remove-player {
        font-size: 12px;
        padding: 6px 12px;
    }

    .add-player-section {
        margin-top: 15px;
    }

    .btn-add-player {
        width: 100%;
        padding: 14px 20px;
        font-size: 14px;
    }

    .dashboard-actions {
        padding: 20px 15px;
        flex-direction: column;
        gap: 12px;
    }

    button {
        width: 100%;
        min-width: auto;
        padding: 16px 24px;
        font-size: 15px;
    }

    .date-input-wrapper {
        position: relative;
    }

    .date-icon {
        right: 14px;
    }

    .help-text {
        font-size: 11px;
        margin-top: 4px;
    }

    .error-message {
        font-size: 11px;
        margin-top: 4px;
    }

    .unique-number-display {
        margin: 20px 15px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .registration-container {
        padding: 8px;
    }

    .registration-header {
        padding: 12px;
    }

    .dashboard-header {
        padding: 15px 12px 12px;
    }

    .form-title {
        font-size: 18px;
    }

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

    .dashboard-card {
        margin: 12px 8px;
        width: calc(100% - 16px);
        max-width: 100%;
    }

    .card-header {
        padding: 15px 12px;
    }

    .card-content {
        padding: 15px 12px;
    }

    .card-icon-wrapper {
        width: 44px;
        height: 44px;
    }

    .card-icon {
        width: 22px;
        height: 22px;
    }

    .card-title {
        font-size: 16px;
    }

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

    .form-grid {
        gap: 12px;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 16px;
    }

    .player-card {
        padding: 15px 12px;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .step-label {
        font-size: 9px;
    }

    .dashboard-actions {
        padding: 15px 12px;
    }

    button {
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* Touch-friendly improvements for mobile */
@media (max-width: 768px) {
    input[type="text"],
    input[type="tel"],
    input[type="date"],
    select,
    .form-input {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        min-height: 48px; /* Touch target size */
    }

    select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23072549' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 14px center;
        padding-right: 40px;
    }

    button,
    .btn-add-player,
    .btn-remove-player {
        min-height: 44px; /* Touch target size */
        -webkit-tap-highlight-color: rgba(255, 93, 0, 0.2);
    }

    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative;
    }

    .registration-container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 10px;
        padding-right: 10px;
    }

    .form-wrapper {
        width: 100% !important;
        max-width: 100% !important;
    }

    .dashboard-header {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .card-content {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .form-grid {
        width: 100% !important;
        max-width: 100% !important;
    }

    .form-grid-item {
        width: 100% !important;
        max-width: 100% !important;
    }

    input, select, textarea, .form-input {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Hide decorative elements that might cause overflow */
    .registration-container::before,
    .registration-container::after {
        display: none !important;
    }

    body::before,
    body::after {
        width: 100vw !important;
        max-width: 100% !important;
    }

    /* Improve card spacing on mobile */
    .dashboard-card + .dashboard-card {
        margin-top: 15px;
    }

    /* Better form message display */
    .form-message {
        margin: 15px;
        padding: 12px 15px;
        font-size: 13px;
    }

    .unique-number-display {
        margin: 15px;
        padding: 15px;
    }

    .unique-number-content h3 {
        font-size: 16px;
    }

    .unique-number-value {
        font-size: 18px;
        padding: 12px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .form-title {
        font-size: 16px;
    }

    .card-title {
        font-size: 15px;
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .step-label {
        font-size: 8px;
    }
}

/* Rules and Regulations Popup */
.rules-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow: auto;
}

.rules-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
}

.rules-popup-content {
    position: relative;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    z-index: 10001;
    animation: popupSlideIn 0.3s ease-out;
    margin: auto;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.rules-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 2px solid var(--border);
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    border-radius: 12px 12px 0 0;
}

.rules-popup-header h2 {
    color: var(--white);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.rules-popup-close {
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
}

.rules-popup-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.rules-popup-close svg {
    stroke: currentColor;
}

.rules-popup-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 140px);
}

.rules-popup-body ol {
    margin: 0;
    padding-left: 20px;
}

.rules-popup-body li {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-dark);
}

.rules-popup-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border);
    background: var(--bg-light);
    border-radius: 0 0 12px 12px;
    text-align: center;
}

.btn-rules-close {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    padding: 12px 40px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 93, 0, 0.3);
}

.btn-rules-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 93, 0, 0.4);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

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

/* Consent Checkbox Styles */
#consent-checkbox {
    accent-color: var(--primary);
    cursor: pointer;
}

#consent-checkbox:checked {
    accent-color: var(--primary);
}

#view-rules-link {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

#view-rules-link:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* Event Details Banner and Prizes Section */
.event-details-banner {
    padding: 25px 50px;
}

.prizes-section {
    padding: 25px 50px;
}

.email-notice-banner {
    padding: 15px 50px;
}

/* Marathon Form */
.marathon-form {
    padding: 40px 50px;
}

/* Consent Checkbox Container */
.consent-checkbox-container {
    padding: 20px 50px;
    background: #f8f9fa;
    border-top: 1px solid #e0e7f0;
    border-bottom: 1px solid #e0e7f0;
}

.consent-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

#consent-checkbox {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.consent-label {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    cursor: pointer;
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#consent-error {
    display: block;
    margin-top: 8px;
    margin-left: 30px;
}

@media (max-width: 768px) {
    /* Event Details and Prizes Section */
    .event-details-banner {
        padding: 20px 15px !important;
    }
    
    .prizes-section {
        padding: 20px 15px !important;
    }
    
    .prizes-section h3 {
        font-size: 18px !important;
        margin-bottom: 15px !important;
    }
    
    .prizes-section > div {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Form Padding */
    .marathon-form {
        padding: 20px 15px !important;
    }
    
    /* Consent Checkbox Container */
    .consent-checkbox-container {
        padding: 15px 15px !important;
    }
    
    .consent-checkbox-wrapper {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    #consent-checkbox {
        margin-top: 0;
        width: 20px;
        height: 20px;
    }
    
    .consent-label {
        font-size: 13px;
        line-height: 1.5;
        width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    #consent-error {
        margin-left: 0;
        margin-top: 8px;
    }
    
    /* Card Content Padding */
    .card-content {
        padding: 15px !important;
    }
    
    /* Form Grid Item Spacing */
    .form-grid-item {
        margin-bottom: 0;
    }
    
    /* Input Fields */
    .form-input {
        padding: 12px 14px !important;
        font-size: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Email Notice */
    .email-notice-banner {
        padding: 12px 15px !important;
    }
    
    .email-notice-banner p {
        font-size: 13px !important;
    }
    
    .email-notice-banner svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    /* Event Details Grid */
    .event-details-banner > div {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        text-align: left !important;
    }
    
    .event-details-banner > div > div {
        padding: 10px 0;
    }
    
    /* Card Header Padding */
    .card-header {
        padding: 20px 15px !important;
    }
    
    .rules-popup-content {
        max-width: 95%;
        max-height: 95vh;
    }
    
    .rules-popup-header {
        padding: 15px 20px;
    }
    
    .rules-popup-header h2 {
        font-size: 18px;
    }
    
    .rules-popup-body {
        padding: 20px;
    }
    
    .rules-popup-body li {
        font-size: 13px;
    }
    
    .rules-popup-footer {
        padding: 15px 20px;
    }
    
    .btn-rules-close {
        width: 100%;
        padding: 14px 20px;
    }
}
