/* Free Scanner Page Styles */
:root {
    --scanner-bg: #0a0a12;
    --scanner-surface: #14141f;
    --scanner-border: rgba(255, 255, 255, 0.08);
    --scanner-accent: #00ff88;
    --scanner-accent-dim: rgba(0, 255, 136, 0.15);
    --scanner-text: #ffffff;
    --scanner-text-dim: #9ca3af;
    --scanner-success: #22c55e;
    --scanner-warning: #f59e0b;
}

.free-scanner-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
    min-height: 100vh;
    background: var(--scanner-bg);
}

/* Scanner Section */
.scanner-section {
    padding: 20px 16px;
}

.scanner-header {
    text-align: center;
    margin-bottom: 24px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--scanner-accent-dim);
    color: var(--scanner-accent);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.scanner-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--scanner-text);
    margin: 0 0 8px;
    line-height: 1.2;
}

.scanner-header .subtitle {
    color: var(--scanner-text-dim);
    font-size: 0.95rem;
    margin: 0;
}

/* Capture Area */
.scanner-container {
    margin-bottom: 20px;
}

.capture-area {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 400px;
    background: var(--scanner-surface);
    border-radius: 16px;
    overflow: hidden;
    border: 2px dashed var(--scanner-border);
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.capture-area:hover {
    border-color: var(--scanner-accent);
}

.capture-area.dragging {
    border-color: var(--scanner-accent);
    transform: scale(1.02);
    background: var(--scanner-accent-dim);
}

.capture-area video,
.capture-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.capture-area.has-capture img,
.capture-area.camera-active video {
    display: block;
}

.capture-area.camera-active .capture-placeholder,
.capture-area.has-capture .capture-placeholder {
    display: none;
}

.capture-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--scanner-text-dim);
    pointer-events: none;
}

.placeholder-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--scanner-accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.placeholder-icon i {
    font-size: 32px;
    color: var(--scanner-accent);
}

.capture-placeholder p {
    font-size: 1rem;
    font-weight: 500;
    color: var(--scanner-text);
    margin: 0 0 4px;
}

.capture-placeholder .hint {
    font-size: 0.8rem;
    color: var(--scanner-text-dim);
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.loading-overlay.active {
    display: flex;
}

.scanner-pulse {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--scanner-accent);
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    color: var(--scanner-text);
    font-weight: 500;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.btn-scan, .btn-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-scan {
    background: linear-gradient(135deg, var(--scanner-accent), #00cc6a);
    color: #000;
}

.btn-scan:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
}

.btn-upload {
    background: var(--scanner-surface);
    color: var(--scanner-text);
    border: 1px solid var(--scanner-border);
}

.btn-upload:hover {
    background: #1a1a2e;
    border-color: var(--scanner-accent);
}

/* Results Area */
.results-area {
    margin-top: 20px;
}

.primary-result {
    background: var(--scanner-surface);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--scanner-border);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 255, 136, 0.1);
    border-bottom: 1px solid var(--scanner-border);
}

.match-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--scanner-accent);
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-close {
    background: none;
    border: none;
    color: var(--scanner-text-dim);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
}

.result-content {
    display: flex;
    gap: 16px;
    padding: 16px;
}

.result-card-img {
    width: 100px;
    height: 140px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--scanner-bg);
}

.result-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--scanner-text);
    margin: 0 0 4px;
}

.result-set {
    color: var(--scanner-text-dim);
    font-size: 0.85rem;
    margin: 0 0 12px;
}

.price-display {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.price-label {
    font-size: 0.75rem;
    color: var(--scanner-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--scanner-accent);
}

/* Result CTA */
.result-cta {
    padding: 16px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 200, 255, 0.1));
    border-top: 1px solid var(--scanner-border);
    text-align: center;
}

.result-cta p {
    color: var(--scanner-text-dim);
    font-size: 0.9rem;
    margin: 0 0 12px;
}

.btn-cta-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--scanner-accent);
    color: #000;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.2s;
}

.btn-cta-inline:hover {
    transform: translateY(-2px);
}

/* Alternatives Section */
.alternatives-section {
    margin-top: 12px;
}

.alternatives-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--scanner-surface);
    border: 1px solid var(--scanner-border);
    border-radius: 12px;
    color: var(--scanner-text-dim);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.alternatives-toggle:hover {
    border-color: var(--scanner-accent);
    color: var(--scanner-text);
}

.alternatives-toggle.open i {
    transform: rotate(180deg);
}

.alternatives-list {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.alternatives-list.open {
    display: flex;
}

.alt-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--scanner-surface);
    border-radius: 12px;
    border: 1px solid var(--scanner-border);
    cursor: pointer;
    transition: all 0.2s;
}

.alt-card:hover {
    border-color: var(--scanner-accent);
}

.alt-card img {
    width: 50px;
    height: 70px;
    border-radius: 6px;
    object-fit: cover;
}

.alt-card-info {
    flex: 1;
}

.alt-card-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--scanner-text);
}

.alt-card-set {
    font-size: 0.75rem;
    color: var(--scanner-text-dim);
}

.alt-card-price {
    font-weight: 600;
    color: var(--scanner-accent);
}

/* History Section */
.history-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--scanner-border);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.history-header h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--scanner-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-clear-history {
    background: none;
    border: none;
    color: var(--scanner-text-dim);
    font-size: 0.8rem;
    cursor: pointer;
}

.history-rail {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.history-item {
    flex: 0 0 auto;
    width: 80px;
    cursor: pointer;
    transition: transform 0.2s;
}

.history-item:hover {
    transform: translateY(-4px);
}

.history-item img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--scanner-border);
}

.history-item-price {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--scanner-accent);
    margin-top: 4px;
}

/* CTA Banner */
.cta-banner {
    background: linear-gradient(135deg, #1a1a2e, #0f172a);
    padding: 24px 16px;
    margin: 20px 16px;
    border-radius: 16px;
    border: 1px solid var(--scanner-border);
}

.cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.cta-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--scanner-accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-icon i {
    font-size: 24px;
    color: var(--scanner-accent);
}

.cta-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--scanner-text);
    margin: 0 0 4px;
}

.cta-text p {
    font-size: 0.85rem;
    color: var(--scanner-text-dim);
    margin: 0;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--scanner-accent);
    color: #000;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
}

/* Set Spotlight */
.set-spotlight {
    padding: 20px 16px;
    background: var(--scanner-surface);
    margin: 0 16px 20px;
    border-radius: 16px;
    border: 1px solid var(--scanner-border);
}

.spotlight-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.spotlight-header i {
    color: #f97316;
    font-size: 1.2rem;
}

.spotlight-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--scanner-text);
    margin: 0;
}

.set-release {
    color: var(--scanner-text-dim);
    font-size: 0.85rem;
    margin: 0 0 16px;
}

.chase-cards h4 {
    font-size: 0.8rem;
    color: var(--scanner-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
}

.chase-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.chase-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--scanner-bg);
    border-radius: 8px;
    font-size: 0.85rem;
}

.chase-name {
    color: var(--scanner-text);
}

.chase-price {
    color: var(--scanner-accent);
    font-weight: 600;
}

.btn-view-sets {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #38bdf8;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}

.btn-view-sets:hover {
    text-decoration: underline;
}

/* FAQ Section */
.faq-section {
    padding: 24px 16px;
}

.faq-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--scanner-text);
    margin: 0 0 16px;
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: var(--scanner-surface);
    border-radius: 12px;
    border: 1px solid var(--scanner-border);
    overflow: hidden;
}

.faq-item summary {
    padding: 16px;
    font-weight: 500;
    color: var(--scanner-text);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--scanner-accent);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-answer {
    padding: 0 16px 16px;
    color: var(--scanner-text-dim);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Final CTA */
.final-cta {
    text-align: center;
    padding: 32px 16px 48px;
    background: linear-gradient(180deg, transparent, rgba(0, 255, 136, 0.05));
}

.final-cta h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--scanner-text);
    margin: 0 0 8px;
}

.final-cta p {
    color: var(--scanner-text-dim);
    font-size: 0.9rem;
    margin: 0 0 20px;
}

.btn-cta-large {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--scanner-accent), #00cc6a);
    color: #000;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-cta-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.3);
}

/* Desktop Adjustments */
@media (min-width: 768px) {
    .free-scanner-page {
        max-width: 800px;
        padding: 20px;
    }

    .scanner-header h1 {
        font-size: 2.25rem;
    }

    .capture-area {
        max-height: 500px;
    }

    .result-content {
        gap: 24px;
        padding: 24px;
    }

    .result-card-img {
        width: 140px;
        height: 196px;
    }

    .cta-content {
        flex-direction: row;
        text-align: left;
    }

    .cta-text {
        flex: 1;
    }
}

/* Scrollbar */
.history-rail::-webkit-scrollbar {
    height: 4px;
}

.history-rail::-webkit-scrollbar-track {
    background: var(--scanner-surface);
    border-radius: 2px;
}

.history-rail::-webkit-scrollbar-thumb {
    background: var(--scanner-border);
    border-radius: 2px;
}
