/* Basic reset and variables */
:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.nav-brand a {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.logout-form {
    display: inline;
}

.logout-form button {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: inherit;
}

.logout-form button:hover {
    color: var(--primary-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Flash messages */
.flash {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.flash-success {
    background-color: #dcfce7;
    color: #166534;
}

.flash-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.flash-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.flash-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Terms acceptance banner */
.terms-banner {
    background-color: #fef3c7;
    color: #92400e;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #fcd34d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.terms-banner a {
    color: #92400e;
    font-weight: 600;
}

.terms-banner .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    margin-left: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}

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

.btn-primary:hover {
    background-color: #1d4ed8;
}

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

.btn-secondary:hover {
    background-color: #475569;
}

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

.btn-danger:hover {
    background-color: #dc2626;
}

/* Landing page */
.landing {
    text-align: center;
    padding: 4rem 0;
}

.landing h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.landing .tagline {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.landing .hero-description {
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.landing .how-it-works {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 3rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

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

.feature h3 {
    margin-bottom: 0.5rem;
}

.cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Auth forms */
.auth-form {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.auth-form h2 {
    margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Error page */
.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-page h1 {
    font-size: 6rem;
    color: var(--secondary-color);
}

/* Footer */
.footer {
    color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
    padding: 2rem 2rem 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 1.5rem;
}

.footer-logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-color);
}

.footer-tagline {
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--text-color);
}

.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--bg-color);
    font-weight: 600;
}

/* Cards list */
.cards-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card-item {
    display: flex;
    flex-direction: row;
    gap: 1.25rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: box-shadow 0.2s ease;
}

.card-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card-preview {
    flex-shrink: 0;
    width: 160px;
    height: 120px;
    border-radius: 0.375rem;
    overflow: hidden;
    background: var(--bg-color);
}

.card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.card-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem 0.5rem;
}

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.card-type-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
    background: #dbeafe;
    color: #1e40af;
    white-space: nowrap;
    flex-shrink: 0;
}

.card-description {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    color: var(--secondary-color);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-meta .dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--secondary-color);
}

.card-url-bar {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    overflow: hidden;
    max-width: 480px;
}

.card-url-bar code {
    flex: 1;
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: none;
}

.card-url-bar .btn-copy {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: none;
    border-left: 1px solid var(--border-color);
    background: white;
    color: var(--primary-color);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.card-url-bar .btn-copy:hover {
    background: var(--bg-color);
}

.card-dest-url {
    font-size: 0.75rem;
    color: var(--secondary-color);
    max-width: 480px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-dest-url a {
    color: var(--secondary-color);
    text-decoration: none;
}

.card-dest-url a:hover {
    text-decoration: underline;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--secondary-color);
}

.empty-state svg {
    margin-bottom: 1rem;
}

.empty-state p {
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

/* Cards list responsive */
@media (max-width: 600px) {
    .card-item {
        flex-direction: column;
    }

    .card-preview {
        width: 100%;
        height: 180px;
    }

    .card-url-bar {
        max-width: 100%;
    }

    .card-dest-url {
        max-width: 100%;
    }
}

/* Auth form enhancements */
.btn-full {
    width: 100%;
    text-align: center;
}

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

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

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

.auth-links {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-links p {
    margin: 0.5rem 0;
}

.tier-info-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.tier-info {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
}

.tier-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tier-badge-free {
    background: #f1f5f9;
    color: var(--secondary-color);
}

.tier-badge-pro {
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
    color: var(--primary-color);
}

.tier-badge-business {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.tier-text {
    color: var(--secondary-color);
}

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

.form-group.checkbox input {
    width: auto;
}

.error {
    color: var(--error-color);
    font-size: 0.875rem;
    display: block;
    margin-top: 0.25rem;
}

/* Dashboard styles */
.dashboard {
    max-width: 1000px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
}

.stat-card:nth-child(1)::before {
    background: var(--primary-color);
}

.stat-card:nth-child(2)::before {
    background: var(--success-color);
}

.stat-card:nth-child(3)::before {
    background: var(--warning-color);
}

.stat-card:nth-child(4)::before {
    background: #8b5cf6;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.stat-card h3 {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
}

/* API Key display */
.api-key-display {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: monospace;
    word-break: break-all;
    margin: 1rem 0;
}

.api-key-warning {
    background: #fef3c7;
    color: #92400e;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Admin styles */
.admin-nav {
    display: flex;
    gap: 0.5rem;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-form .form-control {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
}

.inline-form {
    display: inline;
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    background: var(--bg-color);
    color: var(--secondary-color);
}

.badge-admin {
    background: #dbeafe;
    color: #1e40af;
}

.text-muted {
    color: var(--secondary-color);
}

table select {
    padding: 0.375rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

code {
    background: var(--bg-color);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.pagination a {
    color: var(--primary-color);
    text-decoration: none;
}

.pagination a:hover {
    text-decoration: underline;
}

/* Pricing page */
.pricing-page {
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-header {
    text-align: center;
    margin-bottom: 3rem;
}

.pricing-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.pricing-header p {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.pricing-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.pricing-card.current {
    border-color: var(--success-color);
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.current-plan-badge {
    display: inline-block;
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.pricing-price {
    margin-bottom: 1.5rem;
}

.pricing-price .amount {
    font-size: 3rem;
    font-weight: bold;
}

.pricing-price .period {
    color: var(--secondary-color);
}

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

.pricing-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-card .btn {
    width: 100%;
}

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

.pricing-faq {
    margin-top: 4rem;
}

.pricing-faq h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.faq-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.faq-item h4 {
    margin-bottom: 0.5rem;
}

.faq-item p {
    color: var(--secondary-color);
    margin: 0;
}

/* Billing page */
.billing-page {
    max-width: 800px;
    margin: 0 auto;
}

.current-plan-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.current-plan-card h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.plan-info {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.plan-name {
    font-size: 2rem;
    font-weight: bold;
}

.plan-price {
    color: var(--secondary-color);
    font-size: 1.25rem;
}

.plan-limit {
    color: var(--secondary-color);
}

.subscription-details {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.subscription-details p {
    margin: 0.5rem 0;
}

.cancel-notice {
    color: var(--warning-color);
    font-weight: 500;
}

.billing-actions {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.billing-actions h3 {
    margin-bottom: 0.5rem;
}

.billing-actions p {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.upgrade-section {
    margin-top: 2rem;
}

.upgrade-section h3 {
    margin-bottom: 1.5rem;
}

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

.plan-option {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
}

.plan-option.featured {
    border-color: var(--primary-color);
}

.plan-option h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.plan-option-price {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

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

.plan-option ul li {
    padding: 0.25rem 0;
}

.billing-back {
    margin-top: 2rem;
}

.billing-back a {
    color: var(--secondary-color);
    text-decoration: none;
}

.billing-back a:hover {
    color: var(--primary-color);
}

/* Billing result pages */
.billing-result {
    max-width: 500px;
    margin: 4rem auto;
    text-align: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 3rem;
}

.result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
}

.result-icon.success {
    background: #dcfce7;
    color: var(--success-color);
}

.result-icon.cancelled {
    background: #fee2e2;
    color: var(--error-color);
}

.billing-result h2 {
    margin-bottom: 1rem;
}

.billing-result p {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.result-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Upgrade prompt on dashboard */
.upgrade-prompt {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fe 50%, #f5f0ff 100%);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 1.5rem;
}

.upgrade-prompt-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.upgrade-prompt h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1.25rem;
}

.upgrade-prompt p {
    color: var(--secondary-color);
    margin-bottom: 1.25rem;
    max-width: 450px;
    line-height: 1.6;
}

/* Settings section improvements */
.settings-section {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-section h3 {
    margin-bottom: 1rem;
}

.settings-section p {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.settings-table {
    margin: 0;
}

.settings-table th {
    background: transparent;
    width: 150px;
}

/* Card creation form - conditional fields */
.conditional-fields {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
}

.conditional-fields h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--text-color);
}

.conditional-fields .form-hint {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group.half {
    flex: 1;
}

.card-form {
    max-width: 600px;
}

.card-form small {
    display: block;
    margin-top: 0.25rem;
    color: var(--secondary-color);
    font-size: 0.8rem;
}

/* Create Card Page Revamp */
.create-card-page {
    max-width: 900px;
}

.create-card-page .page-header {
    margin-bottom: 2rem;
}

.create-card-page .page-subtitle {
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

.create-card-form .form-section {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.create-card-form .section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 1.25rem 0;
}

/* Card Type Selection Grid */
.card-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.card-type-option {
    position: relative;
    cursor: pointer;
}

.card-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.card-type-content {
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.2s ease;
    height: 100%;
    background: white;
}

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

.card-type-option.selected .card-type-content {
    border-color: var(--primary-color);
    background: #f0f7ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.card-type-option .card-type-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
}

.card-type-option .card-type-badge.recommended {
    background: var(--primary-color);
    color: white;
}

.card-type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #f1f5f9;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    transition: all 0.2s ease;
}

.card-type-option.selected .card-type-icon {
    background: var(--primary-color);
    color: white;
}

.card-type-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
}

.card-type-desc {
    font-size: 0.85rem;
    color: var(--secondary-color);
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
}

.card-type-specs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-type-specs .spec {
    font-size: 0.75rem;
    background: #f1f5f9;
    color: var(--secondary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
}

.card-type-option.locked {
    cursor: default;
    opacity: 0.6;
}

.card-type-option.locked:hover .card-type-content {
    border-color: var(--border-color);
    background: white;
}

.card-type-option .card-type-badge.premium-lock {
    background: #7c3aed;
    color: white;
}

.card-type-upgrade-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #7c3aed;
    text-decoration: none;
}

.card-type-upgrade-link:hover {
    text-decoration: underline;
}

/* Image Upload Area */
.image-upload-area {
    position: relative;
}

.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 0.75rem;
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.upload-zone .upload-icon {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.upload-zone .upload-text {
    font-size: 1rem;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
}

.upload-zone .upload-link {
    color: var(--primary-color);
    font-weight: 500;
}

.upload-zone .upload-hint {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin: 0;
}

.upload-zone .file-input {
    display: none;
}

.image-preview {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f1f5f9;
}

.image-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    display: block;
}

.image-preview .remove-image {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.image-preview .remove-image:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Info Banner */
.info-banner {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #92400e;
}

/* Required indicator */
.required {
    color: var(--error-color);
}

/* Responsive */
@media (max-width: 640px) {
    .card-type-grid {
        grid-template-columns: 1fr;
    }

    .card-type-option .card-type-badge {
        position: static;
        display: inline-block;
        margin-bottom: 0.75rem;
    }
}

/* ===========================================
   Landing Page Revamp Styles
   =========================================== */

/* Landing Page Container */
.landing-page {
    overflow-x: hidden;
}

/* Hero Section */
.hero {
    padding: 4rem 2rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text .hero-description {
    font-size: 1.2rem;
    color: var(--secondary-color);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-cta {
    margin-bottom: 2rem;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    transition: all 0.3s ease;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.trust-indicator {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-top: 0.75rem;
}

.platform-badges {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.badge-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.platform-badge {
    background: white;
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    color: var(--text-color);
    font-weight: 500;
}

/* Hero Visual - CSS-Only Mockup */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mockup-container {
    position: relative;
    perspective: 1000px;
}

.mockup-card {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    width: 320px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
    border: 1px solid var(--border-color);
}

.mockup-card:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.mockup-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.mockup-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.mockup-user {
    flex: 1;
}

.mockup-name {
    height: 12px;
    width: 100px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-bottom: 4px;
}

.mockup-handle {
    height: 10px;
    width: 70px;
    background: #f1f5f9;
    border-radius: 4px;
}

.mockup-text {
    height: 10px;
    width: 90%;
    background: #f1f5f9;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.mockup-preview {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
}

.mockup-image {
    height: 140px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #8b5cf6 50%, #ec4899 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mockup-brand {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.mockup-meta {
    padding: 0.75rem;
    background: #f8fafc;
}

.mockup-title {
    height: 12px;
    width: 80%;
    background: #e2e8f0;
    border-radius: 4px;
    margin-bottom: 6px;
}

.mockup-desc {
    height: 10px;
    width: 100%;
    background: #f1f5f9;
    border-radius: 4px;
    margin-bottom: 6px;
}

.mockup-url {
    height: 8px;
    width: 50%;
    background: #f1f5f9;
    border-radius: 4px;
}

/* Floating Elements */
.floating-element {
    position: absolute;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-1 {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    top: -20px;
    right: -30px;
    animation-delay: 0s;
}

.floating-2 {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    bottom: 40px;
    left: -20px;
    animation-delay: 2s;
}

.floating-3 {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(37, 99, 235, 0.2) 100%);
    top: 60%;
    right: -40px;
    animation-delay: 4s;
}

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

/* How It Works Section */
.how-it-works {
    background: white;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    flex-wrap: wrap;
}

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

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.step-text {
    font-weight: 500;
    color: var(--text-color);
}

.step-arrow {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

/* Features Section */
.features-section {
    padding: 5rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.1);
}

.feature-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--secondary-color);
    line-height: 1.6;
}

/* Final CTA Section */
.final-cta {
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 50%, #fce7f3 100%);
    padding: 5rem 2rem;
    text-align: center;
}

.final-cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.final-cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.final-cta p {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.final-cta .trust-indicator {
    margin-top: 1rem;
}

/* Quick Actions Menu - Dashboard */
.quick-actions {
    margin-top: 2.5rem;
}

.quick-actions-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.quick-action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
}

.quick-action-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.quick-action-card:hover .quick-action-icon {
    background: var(--primary-color);
    color: white;
}

.quick-action-card:hover .quick-action-arrow {
    color: var(--primary-color);
    transform: translateX(4px);
}

.quick-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border-radius: 0.75rem;
    color: var(--secondary-color);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.quick-action-content {
    flex: 1;
    min-width: 0;
}

.quick-action-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.quick-action-desc {
    display: block;
    font-size: 0.85rem;
    color: var(--secondary-color);
    line-height: 1.4;
}

.quick-action-arrow {
    color: var(--border-color);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-text .hero-description {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .platform-badges {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .mockup-card {
        transform: none;
    }

    .mockup-card:hover {
        transform: none;
    }

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

@media (max-width: 768px) {
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .quick-action-card {
        padding: 1rem;
    }

    .quick-action-icon {
        width: 40px;
        height: 40px;
    }

    .quick-action-icon svg {
        width: 20px;
        height: 20px;
    }

    .quick-action-desc {
        display: none;
    }

    .hero {
        padding: 2rem 1rem 4rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text .hero-description {
        font-size: 1rem;
    }

    .mockup-card {
        width: 280px;
    }

    .mockup-image {
        height: 100px;
    }

    .mockup-brand {
        font-size: 1.2rem;
    }

    .floating-element {
        display: none;
    }

    .steps {
        flex-direction: column;
        gap: 1rem;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .section-title {
        font-size: 1.5rem;
    }

    .final-cta h2 {
        font-size: 1.5rem;
    }

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

/* ===========================================
   Card Analytics Page
   =========================================== */

.analytics-header {
    margin-bottom: 1.5rem;
}

.analytics-header a {
    margin-bottom: 0.75rem;
    display: inline-block;
}

.analytics-header h2 {
    margin-top: 0.5rem;
}

.analytics-time-range {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.analytics-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 0.8rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
}

.summary-value-sm {
    font-size: 1.1rem;
}

.analytics-chart-full {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.analytics-chart-full h3,
.analytics-chart-half h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.analytics-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.analytics-chart-half {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.analytics-empty {
    color: var(--secondary-color);
    text-align: center;
    padding: 2rem 0;
}

/* Analytics Upgrade Prompt */
.upgrade-prompt {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fe 50%, #f5f0ff 100%);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    max-width: 500px;
    margin: 2rem auto;
}

.upgrade-prompt-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upgrade-prompt h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.upgrade-prompt-total {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.upgrade-prompt p {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

.upgrade-features li {
    padding: 0.35rem 0;
    color: var(--text-color);
}

.upgrade-features li::before {
    content: "\2713  ";
    color: var(--primary-color);
    font-weight: bold;
}

@media (max-width: 768px) {
    .analytics-summary {
        grid-template-columns: 1fr;
    }

    .analytics-charts-row {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   X/Twitter Card Preview (collapsible)
   =========================================== */

.x-preview-toggle {
    width: 100%;
}

.x-preview-toggle summary {
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--secondary-color);
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.x-preview-toggle summary::-webkit-details-marker {
    display: none;
}

.x-preview-toggle summary::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid var(--secondary-color);
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    transition: transform 0.15s ease;
}

.x-preview-toggle[open] summary::before {
    transform: rotate(90deg);
}

.x-preview-toggle summary:hover {
    color: var(--text-color);
}

.x-preview-toggle summary:hover::before {
    border-left-color: var(--text-color);
}

/* Shared preview container */
.x-preview {
    margin-top: 0.625rem;
    border: 1px solid #cfd9de;
    border-radius: 1rem;
    overflow: hidden;
    max-width: 440px;
    background: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Summary card: horizontal layout */
.x-preview--summary {
    display: flex;
    flex-direction: row;
}

.x-preview--summary .x-preview-thumb {
    flex-shrink: 0;
    width: 130px;
    background: #f7f9f9;
    border-right: 1px solid #cfd9de;
}

.x-preview--summary .x-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.x-preview--summary .x-preview-body {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.125rem;
}

/* Large image card: vertical layout */
.x-preview--large .x-preview-image {
    width: 100%;
    aspect-ratio: 1.91 / 1;
    overflow: hidden;
    background: #f7f9f9;
    border-bottom: 1px solid #cfd9de;
}

.x-preview--large .x-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.x-preview--large .x-preview-body {
    padding: 0.65rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

/* Text elements — shared */
.x-preview-domain {
    font-size: 0.775rem;
    color: #536471;
    line-height: 1.2;
}

.x-preview-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f1419;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.x-preview-desc {
    font-size: 0.775rem;
    color: #536471;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 600px) {
    .x-preview--summary {
        flex-direction: column;
    }

    .x-preview--summary .x-preview-thumb {
        width: 100%;
        height: 140px;
        border-right: none;
        border-bottom: 1px solid #cfd9de;
    }
}

/* Preview & Share page */
.preview-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}
.preview-page-header h2 { margin-bottom: 0.25rem; }
.preview-card-title { color: var(--text-secondary); font-size: 0.95rem; }

.preview-url-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}
.preview-url-bar code { flex: 1; font-size: 0.9rem; color: var(--text-secondary); }

.preview-share-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
}
.preview-share-link:hover { text-decoration: underline; }

/* Share buttons */
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    color: white;
    transition: opacity 0.15s;
}
.share-btn:hover { opacity: 0.9; color: white; }
.share-btn-x { background: #000; }
.share-btn-linkedin { background: #0A66C2; }
.share-btn-facebook { background: #1877F2; }
.share-btn-reddit { background: #FF4500; }

/* Platform preview grid */
.platform-previews {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.platform-preview-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
}
.platform-preview-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

/* X / Twitter mock */
.mock-x-large, .mock-x-summary {
    border: 1px solid #cfd9de;
    border-radius: 16px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.mock-x-large .mock-x-image { aspect-ratio: 1200/628; overflow: hidden; }
.mock-x-large .mock-x-image img, .mock-x-summary .mock-x-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mock-x-summary { display: flex; }
.mock-x-summary .mock-x-thumb { width: 130px; min-height: 130px; flex-shrink: 0; overflow: hidden; border-right: 1px solid #cfd9de; }
.mock-x-body { padding: 0.6rem 0.75rem; display: flex; flex-direction: column; gap: 0.15rem; }
.mock-x-domain { font-size: 0.75rem; color: #536471; }
.mock-x-title { font-size: 0.85rem; font-weight: 400; color: #0f1419; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.mock-x-desc { font-size: 0.75rem; color: #536471; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* LinkedIn mock */
.mock-linkedin {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f3f2ef;
}
.mock-linkedin-image { aspect-ratio: 1200/628; overflow: hidden; }
.mock-linkedin-image img { width: 100%; height: 100%; object-fit: cover; }
.mock-linkedin-body { padding: 0.6rem 0.75rem; background: white; border-top: 1px solid #e0e0e0; }
.mock-linkedin-title { display: block; font-size: 0.85rem; font-weight: 600; color: rgba(0,0,0,0.9); margin-bottom: 0.15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mock-linkedin-domain { font-size: 0.75rem; color: rgba(0,0,0,0.6); }

/* Facebook mock */
.mock-facebook {
    border: 1px solid #dadde1;
    border-radius: 8px;
    overflow: hidden;
    font-family: Helvetica, Arial, sans-serif;
    background: #f0f2f5;
}
.mock-facebook-image { aspect-ratio: 1200/628; overflow: hidden; }
.mock-facebook-image img { width: 100%; height: 100%; object-fit: cover; }
.mock-facebook-body { padding: 0.6rem 0.75rem; background: #f0f2f5; }
.mock-facebook-domain { display: block; font-size: 0.7rem; color: #65676b; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.2rem; }
.mock-facebook-title { display: block; font-size: 0.9rem; font-weight: 600; color: #1c1e21; margin-bottom: 0.15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mock-facebook-desc { display: block; font-size: 0.8rem; color: #65676b; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* Reddit mock */
.mock-reddit {
    border: 1px solid #edeff1;
    border-radius: 8px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: white;
}
.mock-reddit-image { aspect-ratio: 1200/628; overflow: hidden; }
.mock-reddit-image img { width: 100%; height: 100%; object-fit: cover; }
.mock-reddit-body { padding: 0.5rem 0.75rem; }
.mock-reddit-title { display: block; font-size: 0.9rem; font-weight: 500; color: #1a1a1b; margin-bottom: 0.15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mock-reddit-domain { font-size: 0.75rem; color: #787c7e; }

@media (max-width: 600px) {
    .preview-page-header { flex-direction: column; gap: 1rem; }
    .share-buttons { flex-direction: column; }
    .share-btn { justify-content: center; }
    .mock-x-summary { flex-direction: column; }
    .mock-x-summary .mock-x-thumb { width: 100%; min-height: 100px; border-right: none; border-bottom: 1px solid #cfd9de; }
}

/* Legal pages (Terms, Privacy, DMCA) */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2.5rem;
}

.legal-page h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.legal-updated {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.legal-page h2 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.legal-page p {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.legal-page ul,
.legal-page ol {
    margin: 0 0 1rem 1.5rem;
}

.legal-page li {
    margin-bottom: 0.4rem;
    line-height: 1.7;
}

.legal-page a {
    color: var(--primary-color);
    text-decoration: none;
}

.legal-page a:hover {
    text-decoration: underline;
}

.legal-page address {
    font-style: normal;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin: 0.75rem 0;
    line-height: 1.8;
}

.legal-entity {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-color);
    font-size: 0.9rem;
}
