/* =============================================================================
   CSS VARIABLES
   ============================================================================= */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #16a34a;
    --success-hover: #15803d;
    --danger-color: #dc2626;
    --warning-color: #f59e0b;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

/* =============================================================================
   RESET & BASE
   ============================================================================= */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =============================================================================
   HEADER
   ============================================================================= */

.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Header Brand with Logo */
.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    transition: opacity 0.2s ease;
}

.header-brand:hover {
    opacity: 0.85;
    text-decoration: none;
}

.header-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.header-brand span {
    color: var(--primary-color);
}

/* Main Navigation */
.main-nav {
    display: flex;
    gap: 0.5rem;
    margin-left: 2rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: var(--background);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

.nav-link.nav-highlight {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    font-weight: 600;
}

.nav-link.nav-highlight:hover {
    background: linear-gradient(135deg, #d97706, #dc2626);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

#user-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-email {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.subscription-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.subscription-badge.active {
    background: #dcfce7;
    color: #166534;
}

.subscription-badge.trial {
    background: #fef3c7;
    color: #92400e;
}

.subscription-badge.inactive {
    background: #fee2e2;
    color: #991b1b;
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: var(--success-hover);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--background);
}

.btn-google {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-google:hover {
    background: var(--background);
}

.btn-full {
    width: 100%;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =============================================================================
   MAIN CONTENT
   ============================================================================= */

.main-content {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.card h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.hidden {
    display: none !important;
}

/* =============================================================================
   UPLOAD AREA
   ============================================================================= */

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder svg {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.upload-placeholder p {
    color: var(--text-secondary);
}

.upload-placeholder .small {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.file-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #f0f7ff;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-info .file-name {
    font-weight: 600;
}

.file-info .file-size {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* =============================================================================
   MAPPING GRID
   ============================================================================= */

.mapping-grid {
    display: grid;
    gap: 0.75rem;
}

.mapping-row {
    display: grid;
    grid-template-columns: 1fr 2fr 100px;
    gap: 1rem;
    align-items: center;
    padding: 0.5rem;
    background: var(--background);
    border-radius: var(--radius);
}

.mapping-row label {
    font-weight: 500;
    font-size: 0.875rem;
}

.mapping-row select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.mapping-row .sample {
    font-size: 0.75rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.required-badge {
    font-size: 0.625rem;
    background: #fee2e2;
    color: #991b1b;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

/* =============================================================================
   OPTIONS
   ============================================================================= */

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
}

.form-group select,
.form-group input[type="number"],
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* =============================================================================
   RESULT AREA
   ============================================================================= */

.result-area {
    margin-top: 1.5rem;
}

.result-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #dcfce7;
    border-radius: var(--radius);
}

.result-stats .stat {
    text-align: center;
}

.result-stats .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #166534;
}

.result-stats .stat-label {
    font-size: 0.75rem;
    color: #166534;
}

#result-preview {
    width: 100%;
    height: 200px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    resize: vertical;
}

/* =============================================================================
   MODALS
   ============================================================================= */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal .close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal .close:hover {
    color: var(--text-primary);
}

.modal h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* =============================================================================
   SUBSCRIPTION
   ============================================================================= */

.subscription-container {
    text-align: center;
}

.subscription-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.pricing-card {
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.pricing-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.price {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.features {
    list-style: none;
    margin-bottom: 1.5rem;
    text-align: left;
}

.features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.trial-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.coupon-section {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius-md);
}

.coupon-input-group {
    display: flex;
    gap: 0.5rem;
}

.coupon-input-group input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.coupon-input-group .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.coupon-status {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    min-height: 1.25rem;
}

.coupon-status.success {
    color: var(--success-color);
}

.coupon-status.error {
    color: var(--error-color);
}

.price-original {
    text-decoration: line-through;
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin-right: 0.5rem;
}

.price-free {
    color: var(--success-color);
}

/* =============================================================================
   LOADING
   ============================================================================= */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* =============================================================================
   FOOTER
   ============================================================================= */

.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* =============================================================================
   ATHLETIC.NET MATCHING
   ============================================================================= */

.result-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.candidate-card {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.candidate-card:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.candidate-card.selected {
    border-color: var(--primary-color);
    background: #e0edff;
}

.candidate-card .candidate-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.candidate-card .candidate-school {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.candidate-card .candidate-score {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    float: right;
}

.candidate-card .candidate-score.high {
    background: #dcfce7;
    color: #166534;
}

.candidate-card .candidate-score.medium {
    background: #fef3c7;
    color: #92400e;
}

.candidate-card .candidate-score.low {
    background: #fee2e2;
    color: #991b1b;
}

.no-candidates {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* =============================================================================
   RECORD TYPE SELECTION
   ============================================================================= */

.record-type-section {
    margin-bottom: 1.5rem;
}

.record-type-section h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.record-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.record-type-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--card-bg);
}

.record-type-card:hover {
    border-color: var(--primary-color);
    background: #f8fafc;
}

.record-type-card:has(input:checked) {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.record-type-card input[type="checkbox"] {
    display: none;
}

.record-type-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    border-radius: 8px;
    flex-shrink: 0;
}

.record-type-info {
    flex: 1;
    min-width: 0;
}

.record-type-info strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.125rem;
}

.record-type-info span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.record-type-check {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
}

.record-type-card:has(input:checked) .record-type-check {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.record-type-card:has(input:checked) .record-type-check::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Different colors for record types */
#record-type-i-card .record-type-icon {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

#record-type-d-card .record-type-icon {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

#record-type-e-card .record-type-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* =============================================================================
   DATA PREVIEW TABLE
   ============================================================================= */

.data-preview {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.data-preview h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.preview-table-wrapper {
    overflow-x: auto;
    max-height: 200px;
    overflow-y: auto;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.preview-table th,
.preview-table td {
    padding: 0.5rem;
    text-align: left;
    border: 1px solid var(--border-color);
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.preview-table th.mapped {
    background: #16a34a;
}

.preview-table th.unmapped {
    background: #9ca3af;
}

.preview-table td {
    background: white;
}

.preview-table tr:nth-child(even) td {
    background: #f9fafb;
}

/* =============================================================================
   MAPPING SUMMARY
   ============================================================================= */

.mapping-summary {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: var(--radius);
    border: 1px solid #86efac;
    margin-top: 1rem;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-icon {
    font-size: 1.25rem;
}

.summary-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.summary-item strong {
    color: #166534;
    font-size: 1.1rem;
}

/* =============================================================================
   ENHANCED MAPPING GRID
   ============================================================================= */

.mapping-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.75rem;
    align-items: center;
}

.mapping-row {
    display: contents;
}

.mapping-row label {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mapping-row select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: white;
}

.mapping-row .confidence-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.confidence-badge.high {
    background: #dcfce7;
    color: #166534;
}

.confidence-badge.medium {
    background: #fef3c7;
    color: #92400e;
}

.confidence-badge.low {
    background: #fee2e2;
    color: #991b1b;
}

.mapping-row .sample {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.required-badge {
    font-size: 0.65rem;
    padding: 0.125rem 0.375rem;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 3px;
    font-weight: 600;
}

/* =============================================================================
   LAVALAMP BUTTONS - Animated branded buttons for major actions
   ============================================================================= */

/* Base lavalamp button */
.btn-lava {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

a.btn-lava {
    text-decoration: none;
}

a.btn-lava:hover {
    text-decoration: none;
}

.btn-lava::before,
.btn-lava::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.8;
    z-index: -1;
    animation: lava-bubble 4s ease-in-out infinite;
}

.btn-lava::before {
    width: 120%;
    height: 120%;
    top: -10%;
    left: -10%;
}

.btn-lava::after {
    width: 100%;
    height: 100%;
    bottom: -20%;
    right: -20%;
    animation-delay: -2s;
    animation-duration: 5s;
}

/* Bubble elements inside button */
.btn-lava .bubble {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    z-index: -1;
    animation: bubble-float 6s ease-in-out infinite;
}

.btn-lava .bubble:nth-child(1) {
    width: 40px;
    height: 40px;
    left: 10%;
    bottom: -20%;
    animation-delay: 0s;
}

.btn-lava .bubble:nth-child(2) {
    width: 25px;
    height: 25px;
    left: 40%;
    bottom: -15%;
    animation-delay: -1.5s;
    animation-duration: 5s;
}

.btn-lava .bubble:nth-child(3) {
    width: 35px;
    height: 35px;
    right: 15%;
    bottom: -25%;
    animation-delay: -3s;
    animation-duration: 7s;
}

.btn-lava:hover {
    transform: translateY(-3px) scale(1.02);
}

.btn-lava:active {
    transform: translateY(0) scale(0.98);
}

/* Convert Button - Blue theme (trust, action) */
.btn-lava-convert {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #3b82f6 100%);
    box-shadow:
        0 4px 15px rgba(37, 99, 235, 0.4),
        0 0 30px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-lava-convert::before {
    background: radial-gradient(circle, #60a5fa 0%, transparent 70%);
}

.btn-lava-convert::after {
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
}

.btn-lava-convert .bubble {
    background: rgba(147, 197, 253, 0.7);
}

.btn-lava-convert:hover {
    box-shadow:
        0 8px 25px rgba(37, 99, 235, 0.5),
        0 0 50px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Download Button - Green theme (success, completion) */
.btn-lava-download {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 50%, #22c55e 100%);
    box-shadow:
        0 4px 15px rgba(22, 163, 74, 0.4),
        0 0 30px rgba(34, 197, 94, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-lava-download::before {
    background: radial-gradient(circle, #4ade80 0%, transparent 70%);
}

.btn-lava-download::after {
    background: radial-gradient(circle, #22c55e 0%, transparent 70%);
}

.btn-lava-download .bubble {
    background: rgba(134, 239, 172, 0.7);
}

.btn-lava-download:hover {
    box-shadow:
        0 8px 25px rgba(22, 163, 74, 0.5),
        0 0 50px rgba(34, 197, 94, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Verify Button - Orange/Gold theme (attention, verification) */
.btn-lava-verify {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #fbbf24 100%);
    box-shadow:
        0 4px 15px rgba(245, 158, 11, 0.4),
        0 0 30px rgba(251, 191, 36, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-lava-verify::before {
    background: radial-gradient(circle, #fcd34d 0%, transparent 70%);
}

.btn-lava-verify::after {
    background: radial-gradient(circle, #fbbf24 0%, transparent 70%);
}

.btn-lava-verify .bubble {
    background: rgba(253, 224, 71, 0.7);
}

.btn-lava-verify:hover {
    box-shadow:
        0 8px 25px rgba(245, 158, 11, 0.5),
        0 0 50px rgba(251, 191, 36, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Lookup Button - Purple theme (search, discovery) */
.btn-lava-lookup {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #a855f7 100%);
    box-shadow:
        0 4px 15px rgba(124, 58, 237, 0.4),
        0 0 30px rgba(168, 85, 247, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-lava-lookup::before {
    background: radial-gradient(circle, #c084fc 0%, transparent 70%);
}

.btn-lava-lookup::after {
    background: radial-gradient(circle, #a855f7 0%, transparent 70%);
}

.btn-lava-lookup .bubble {
    background: rgba(216, 180, 254, 0.7);
}

.btn-lava-lookup:hover {
    box-shadow:
        0 8px 25px rgba(124, 58, 237, 0.5),
        0 0 50px rgba(168, 85, 247, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Subscribe Button - Gradient of blue to purple (premium, special) */
.btn-lava-subscribe {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #a855f7 100%);
    box-shadow:
        0 4px 15px rgba(124, 58, 237, 0.4),
        0 0 30px rgba(37, 99, 235, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-lava-subscribe::before {
    background: radial-gradient(circle, #60a5fa 0%, transparent 70%);
}

.btn-lava-subscribe::after {
    background: radial-gradient(circle, #c084fc 0%, transparent 70%);
}

.btn-lava-subscribe .bubble {
    background: rgba(196, 181, 253, 0.7);
}

.btn-lava-subscribe:hover {
    box-shadow:
        0 8px 25px rgba(124, 58, 237, 0.5),
        0 0 50px rgba(37, 99, 235, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Contact Button - Teal/Cyan */
.btn-lava-contact {
    background: linear-gradient(135deg, #0d9488 0%, #06b6d4 50%, #22d3ee 100%);
    box-shadow:
        0 4px 15px rgba(6, 182, 212, 0.4),
        0 0 30px rgba(13, 148, 136, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-lava-contact::before {
    background: radial-gradient(circle, #5eead4 0%, transparent 70%);
}

.btn-lava-contact::after {
    background: radial-gradient(circle, #67e8f9 0%, transparent 70%);
}

.btn-lava-contact .bubble {
    background: rgba(153, 246, 228, 0.7);
}

.btn-lava-contact:hover {
    box-shadow:
        0 8px 25px rgba(6, 182, 212, 0.5),
        0 0 50px rgba(13, 148, 136, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Outline/Secondary Lavalamp Button */
.btn-lava-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    text-shadow: none;
    box-shadow: none;
}

.btn-lava-outline::before,
.btn-lava-outline::after {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
}

.btn-lava-outline .bubble {
    background: rgba(37, 99, 235, 0.2);
}

.btn-lava-outline:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.15);
}

/* Athletic.net Red Button */
.btn-lava-anet {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #ef4444 100%);
    box-shadow:
        0 4px 15px rgba(220, 38, 38, 0.4),
        0 0 30px rgba(239, 68, 68, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-lava-anet::before {
    background: radial-gradient(circle, #f87171 0%, transparent 70%);
}

.btn-lava-anet::after {
    background: radial-gradient(circle, #ef4444 0%, transparent 70%);
}

.btn-lava-anet .bubble {
    background: rgba(254, 202, 202, 0.7);
}

.btn-lava-anet:hover {
    box-shadow:
        0 8px 25px rgba(220, 38, 38, 0.5),
        0 0 50px rgba(239, 68, 68, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Google Sign In Button */
.btn-lava-google {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    text-shadow: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-lava-google::before,
.btn-lava-google::after {
    background: radial-gradient(circle, rgba(66, 133, 244, 0.15) 0%, transparent 70%);
}

.btn-lava-google .bubble {
    background: rgba(66, 133, 244, 0.2);
}

.btn-lava-google:hover {
    border-color: #4285F4;
    background: rgba(66, 133, 244, 0.05);
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.2);
}

/* Lavalamp Keyframe Animations */
@keyframes lava-bubble {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        border-radius: 50%;
    }
    25% {
        transform: translate(10%, -15%) scale(1.1) rotate(90deg);
        border-radius: 45% 55% 50% 50%;
    }
    50% {
        transform: translate(-5%, 10%) scale(0.95) rotate(180deg);
        border-radius: 55% 45% 45% 55%;
    }
    75% {
        transform: translate(-10%, -5%) scale(1.05) rotate(270deg);
        border-radius: 48% 52% 55% 45%;
    }
}

@keyframes bubble-float {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    50% {
        transform: translateY(-150%) scale(1.2);
        opacity: 0.4;
    }
    90% {
        opacity: 0.2;
    }
    100% {
        transform: translateY(-250%) scale(0.8);
        opacity: 0;
    }
}

/* Pulse animation for when button is ready/waiting for action */
.btn-lava.pulse {
    animation: lava-pulse 2s ease-in-out infinite;
}

@keyframes lava-pulse {
    0%, 100% {
        box-shadow:
            0 4px 15px var(--shadow-color, rgba(37, 99, 235, 0.4)),
            0 0 30px var(--glow-color, rgba(59, 130, 246, 0.2));
    }
    50% {
        box-shadow:
            0 4px 25px var(--shadow-color, rgba(37, 99, 235, 0.6)),
            0 0 50px var(--glow-color, rgba(59, 130, 246, 0.4));
    }
}

/* Disabled state */
.btn-lava:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-lava:disabled::before,
.btn-lava:disabled::after,
.btn-lava:disabled .bubble {
    animation-play-state: paused;
}

/* Size variations */
.btn-lava.btn-lava-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-lava.btn-lava-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Full width */
.btn-lava.btn-lava-full {
    width: 100%;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

/* Tablet and below */
@media (max-width: 768px) {
    /* Header */
    .header {
        padding: 0.75rem 1rem;
    }

    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .header h1 {
        font-size: 1.25rem;
    }

    .header-brand {
        font-size: 1.25rem;
        gap: 0.5rem;
    }

    .header-logo {
        height: 32px;
    }

    .main-nav {
        margin-left: 0;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    #user-area {
        flex-direction: column;
        gap: 0.5rem;
    }

    .user-email {
        font-size: 0.75rem;
    }

    /* Main Content */
    .main-content {
        padding: 1rem;
    }

    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .card h2 {
        font-size: 1rem;
    }

    /* Upload Area */
    .upload-area {
        padding: 1.5rem 1rem;
    }

    .upload-placeholder p {
        font-size: 0.9rem;
    }

    /* Forms */
    .mapping-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .mapping-row .sample {
        display: none;
    }

    .mapping-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .form-group select,
    .form-group input {
        font-size: 16px; /* Prevent iOS zoom */
        padding: 0.75rem;
    }

    /* Tables */
    .preview-table-wrapper {
        font-size: 0.75rem;
    }

    .preview-table th,
    .preview-table td {
        padding: 0.35rem;
        font-size: 0.7rem;
    }

    /* Result Stats */
    .result-stats {
        flex-direction: column;
        gap: 1rem;
    }

    /* Buttons */
    .btn-lava {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }

    .btn-lava.btn-lava-lg {
        padding: 0.85rem 1.5rem;
        font-size: 0.95rem;
    }

    .result-actions {
        flex-direction: column;
    }

    /* Modals */
    .modal-content {
        padding: 1.25rem;
        max-width: 95%;
        margin: 1rem;
    }

    .modal h2 {
        font-size: 1.25rem;
    }

    /* Pricing */
    .price {
        font-size: 1.75rem;
    }

    .features li {
        font-size: 0.9rem;
    }

    /* Record Type Cards */
    .record-type-grid {
        grid-template-columns: 1fr;
    }

    .record-type-card {
        padding: 0.75rem;
    }

    .record-type-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .header h1 {
        font-size: 1.1rem;
    }

    .header-brand {
        font-size: 1.1rem;
        gap: 0.4rem;
    }

    .header-logo {
        height: 28px;
    }

    .main-nav {
        gap: 0.25rem;
    }

    .nav-link {
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
    }

    .card {
        padding: 0.85rem;
        border-radius: 8px;
    }

    .card h2 {
        font-size: 0.95rem;
    }

    .section-desc {
        font-size: 0.8rem;
    }

    .upload-area {
        padding: 1.25rem 0.75rem;
    }

    .btn-lava {
        padding: 0.6rem 0.85rem;
        font-size: 0.8rem;
    }

    .btn-lava.btn-lava-sm {
        padding: 0.45rem 0.7rem;
        font-size: 0.75rem;
    }

    .btn-lava.btn-lava-lg {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .modal-content {
        padding: 1rem;
    }

    .pricing-card {
        padding: 1rem;
    }

    .price {
        font-size: 1.5rem;
    }

    .coupon-input-group {
        flex-direction: column;
    }

    .coupon-input-group input,
    .coupon-input-group .btn {
        width: 100%;
    }

    .mapping-summary {
        flex-direction: column;
        gap: 0.75rem;
    }

    .data-preview {
        padding: 0.75rem;
    }

    .data-preview h4 {
        font-size: 0.8rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn, .btn-lava {
        min-height: 44px;
    }

    .nav-link {
        min-height: 40px;
        display: flex;
        align-items: center;
    }

    .form-group select,
    .form-group input {
        min-height: 44px;
    }

    .record-type-card {
        min-height: 60px;
    }

    /* Disable hover effects on touch devices */
    .btn-lava:hover {
        transform: none;
    }

    .btn-lava:active {
        transform: scale(0.98);
    }

    .candidate-card:hover {
        border-color: var(--border-color);
        background: transparent;
    }

    .candidate-card:active {
        border-color: var(--primary-color);
        background: #f0f7ff;
    }
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
    .header {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .main-content {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }

    .footer {
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    }
}

/* Landscape phone optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-content {
        max-height: 95vh;
        padding: 1rem;
    }

    .modal h2 {
        margin-bottom: 0.75rem;
    }

    .upload-area {
        padding: 1rem;
    }
}
