/* Vinder - Modern SaaS Design 2026 (Light Theme) */

:root {
    --bg: #ffffff;
    --bg-elevated: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;

    --border: #e2e8f0;
    --border-light: #cbd5e1;

    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --primary: #9333ea;
    --primary-hover: #7c3aed;
    --primary-glow: rgba(147, 51, 234, 0.25);

    --accent: #0891b2;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;

    --gradient: linear-gradient(135deg, #9333ea 0%, #6366f1 50%, #0891b2 100%);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.2s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.hidden { display: none !important; }

/* ========== NAVIGATION ========== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 28px;
    width: auto;
}

.logo-img.small {
    height: 20px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
}

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

.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 8px;
}

.nav-btn {
    padding: 8px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.nav-btn:hover {
    background: var(--border-light);
    border-color: var(--border-light);
}

/* ========== MAIN & STATES ========== */
.main {
    min-height: 100vh;
}

.state-section {
    min-height: 100vh;
}

/* ========== LOADING ========== */
.loader-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.loader {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loader-container p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    padding: 120px 48px 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(147, 51, 234, 0.1);
    border: 1px solid rgba(147, 51, 234, 0.2);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 24px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* ========== HERO CARD ========== */
.hero-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-card {
    position: relative;
    width: 100%;
    max-width: 420px;
}

.card-glow {
    position: absolute;
    inset: -2px;
    background: var(--gradient);
    border-radius: calc(var(--radius-lg) + 2px);
    opacity: 0.5;
    filter: blur(20px);
    z-index: -1;
}

.card-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

.your-code-section {
    text-align: center;
    margin-bottom: 24px;
}

.code-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.code-display {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.code-digit {
    width: 56px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', monospace;
    color: var(--text);
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.divider-line {
    position: relative;
    text-align: center;
    margin: 28px 0;
}

.divider-line::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--border);
}

.divider-line span {
    position: relative;
    padding: 0 16px;
    background: var(--bg-card);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.partner-code-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.code-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.code-input {
    width: 56px;
    height: 64px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', monospace;
    color: var(--text);
    text-align: center;
    outline: none;
    transition: var(--transition);
}

.code-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.code-input.filled {
    border-color: var(--primary);
    background: rgba(147, 51, 234, 0.1);
}

.code-input.shake {
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.connect-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.connect-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

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

.card-hint {
    margin-top: 20px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
}

/* ========== FEATURES ========== */
.features-section {
    padding: 120px 48px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
}

.feature-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========== PRICING ========== */
.pricing-section {
    position: relative;
    padding: 120px 48px;
    overflow: hidden;
}

.pricing-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(147, 51, 234, 0.15), transparent);
    pointer-events: none;
}

.pricing-section .section-header {
    position: relative;
}

.pricing-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-card {
    position: relative;
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.pricing-card-inner {
    height: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.pricing-card:hover .pricing-card-inner {
    border-color: var(--border-light);
}

.pricing-card.featured {
    transform: scale(1.05);
    z-index: 1;
}

.pricing-card.featured .pricing-card-inner {
    background: linear-gradient(180deg, rgba(147, 51, 234, 0.1) 0%, var(--bg-elevated) 50%);
    border-color: var(--primary);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    background: var(--gradient);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    color:#ffffff !important;
}

.pricing-header {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.plan-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin: 12px 0;
}

.price-amount {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.price-period {
    font-size: 1rem;
    color: var(--text-muted);
}

.plan-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.plan-features {
    list-style: none;
    flex: 1;
    margin-bottom: 24px;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.plan-features li strong {
    color: var(--text);
}

.check {
    width: 18px;
    height: 18px;
    background: rgba(34, 197, 94, 0.15);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.check::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 4px;
    width: 4px;
    height: 7px;
    border: solid var(--success);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.plan-btn {
    width: 100%;
    padding: 14px 24px;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

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

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

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

.plan-btn.secondary:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

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

/* ========== FOOTER ========== */
.footer {
    padding: 48px;
    border-top: 1px solid var(--border);
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.footer-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-plan {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-plan strong {
    color: var(--primary);
}

/* ========== WAITING STATE ========== */
.waiting-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px;
}

.waiting-visual {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 32px;
}

.pulse-ring {
    position: absolute;
    inset: 0;
    border: 2px solid var(--primary);
    border-radius: 50%;
    animation: ring-pulse 2s ease-out infinite;
}

.pulse-ring.delay {
    animation-delay: 0.5s;
}

@keyframes ring-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}

.waiting-icon {
    position: absolute;
    inset: 20px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.waiting-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.waiting-text {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.waiting-code {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'SF Mono', 'Monaco', monospace;
    letter-spacing: 8px;
    color: var(--primary);
    margin-bottom: 32px;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text);
}

/* ========== PAIRED STATE ========== */
.paired-container {
    min-height: 100vh;
    padding: 88px 48px 48px;
    max-width: 1200px;
    margin: 0 auto;
}

.paired-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

.connection-status strong {
    color: var(--text);
    font-family: 'SF Mono', 'Monaco', monospace;
}

.btn-end {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.btn-end:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

.paired-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

/* Upload Area */
.upload-area {
    display: flex;
    flex-direction: column;
}

.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    height: 24px;
}

.upload-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.upload-zone {
    background: var(--bg-elevated);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    min-height: 400px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(147, 51, 234, 0.04);
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(147, 51, 234, 0.08);
}

.upload-content {
    text-align: center;
}

.upload-icon {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.upload-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.upload-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.upload-content .link {
    color: var(--primary);
    cursor: pointer;
}

.upload-progress {
    padding: 24px;
    width: 100%;
}

/* Upload Queue */
.upload-queue {
    width: 100%;
}

.upload-queue-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    text-align: center;
}

.upload-queue-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.upload-queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.upload-queue-item.done {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.05);
}

.upload-queue-item.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.upload-queue-info {
    flex: 1;
    min-width: 0;
}

.upload-queue-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.upload-queue-size {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.upload-queue-progress {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 120px;
}

.upload-bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.upload-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.2s ease;
}

.upload-percent {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 36px;
    text-align: right;
}

.upload-status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-queue-item.done .upload-status-icon {
    color: var(--success);
}

.upload-queue-item.error .upload-status-icon {
    color: var(--danger);
}

.storage-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 16px;
    overflow: hidden;
}

.storage-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.storage-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Files Area */
.files-area {
    display: flex;
    flex-direction: column;
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    height: 24px;
}

.files-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.file-count {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.file-list {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    overflow-y: auto;
    min-height: 400px;
    max-height: calc(100vh - 280px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.empty-state span {
    font-size: 0.875rem;
}

.file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    animation: fadeIn 0.3s ease;
    min-height: 60px;
    flex-shrink: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
}

.file-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-hover);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

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

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

.file-name {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.encrypted-badge {
    flex-shrink: 0;
    padding: 0px 4px;
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.15), rgba(5, 150, 105, 0.15));
    border: 1px solid rgba(22, 163, 74, 0.4);
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 600;
    color: #16a34a;
    letter-spacing: 0.5px;
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.file-owner {
    padding: 2px 8px;
    background: var(--bg-hover);
    border-radius: 4px;
}

.file-owner.partner {
    background: rgba(147, 51, 234, 0.15);
    color: var(--primary);
}

.file-download {
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.file-download:hover:not(.downloading) {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.file-download svg {
    width: 16px;
    height: 16px;
}

.file-download.downloading {
    pointer-events: none;
    border-color: var(--primary);
}

.download-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Download progress bar on file card */
.file-card {
    position: relative;
    overflow: hidden;
}

.download-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border);
}

.download-progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.2s ease;
    width: 0%;
}

/* ========== MODALS ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}

.modal {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
}

.modal-sm {
    max-width: 360px;
}

.modal-upgrade {
    max-width: 520px;
}

.modal-upgrade .modal-content {
    padding: 28px 32px !important;
}

.modal-upgrade h2 {
    margin-bottom: 4px;
}

.upgrade-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.15), rgba(99, 102, 241, 0.15));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.upgrade-icon svg {
    width: 28px;
    height: 28px;
}

.upgrade-subtitle {
    color: var(--text-secondary) !important;
    margin-bottom: 16px !important;
    font-size: 0.9375rem;
}

.upgrade-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.upgrade-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    background: var(--bg-hover);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    text-align: center;
}

.upgrade-feature svg {
    color: var(--success);
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.upgrade-feature span {
    line-height: 1.3;
}

.upgrade-feature strong {
    color: var(--text);
    display: block;
}

.upgrade-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.08), rgba(99, 102, 241, 0.08));
    border: 1px solid rgba(147, 51, 234, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.price-badge {
    padding: 6px 14px;
    background: var(--primary);
    color: white;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.price-currency {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.price-amount {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.price-period {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-left: 2px;
}

.price-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.btn-upgrade {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--gradient);
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(147, 51, 234, 0.3);
}

.btn-upgrade:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.payment-methods {
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--bg-hover);
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.modal-content {
    padding: 32px;
}

.modal-content.centered {
    text-align: center;
}

.modal-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-content > p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 24px;
}

.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.modal-icon.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.modal-tabs {
    display: flex;
    background: var(--bg);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}

.tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.tab.active {
    background: var(--bg-hover);
    color: var(--text);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-group input {
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.9375rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

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

.auth-perks {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.perk {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.perk .check {
    width: 14px;
    height: 14px;
}

.perk .check::after {
    left: 5px;
    top: 3px;
    width: 2px;
    height: 5px;
}

/* Magic Link Sent State */
.magic-link-sent {
    text-align: center;
    padding: 24px 0;
}

.magic-link-sent.hidden {
    display: none;
}

.magic-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    margin-bottom: 16px;
}

.magic-link-icon svg {
    color: var(--primary);
}

.magic-link-sent h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 600;
}

.magic-link-sent p {
    margin: 0 0 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.magic-link-sent strong {
    color: var(--text);
}

.text-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s;
}

.text-btn:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* Account Modal */
.account-loading {
    text-align: center;
    padding: 40px 0;
}

.account-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

.account-content.hidden {
    display: none;
}

.account-section {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.account-section:last-child {
    border-bottom: none;
}

.account-section h3 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 12px;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-email {
    font-size: 1rem;
    font-weight: 500;
}

.account-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.plan-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-name {
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: capitalize;
}

.plan-status {
    font-size: 0.875rem;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.plan-status.canceled {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.plan-status.trialing {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.cancel-section {
    margin-top: 12px;
}

.cancel-section.hidden {
    display: none;
}

.cancel-section p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 12px;
}

.btn-cancel {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.upgrade-section {
    margin-top: 12px;
}

.upgrade-section.hidden {
    display: none;
}

/* Transfer Usage */
.transfer-usage {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.transfer-info {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.transfer-info span {
    font-weight: 600;
}

.transfer-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.transfer-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.transfer-bar-fill.warning {
    background: #f59e0b;
}

.transfer-bar-fill.danger {
    background: #ef4444;
}

.transfer-remaining {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.payments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.payment-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.payment-date {
    font-size: 0.875rem;
    font-weight: 500;
}

.payment-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.payment-amount {
    font-weight: 600;
}

.payment-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.payment-link:hover {
    text-decoration: underline;
}

.no-payments {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

.btn-signout {
    width: 100%;
    padding: 12px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-signout:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.submit-btn svg {
    flex-shrink: 0;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-secondary, .btn-danger {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

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

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

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

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

/* ========== TOASTS ========== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2000;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    animation: toastIn 0.3s ease;
    pointer-events: auto;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
}

.toast.removing {
    animation: toastOut 0.2s ease forwards;
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(20px); }
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--primary); }

.toast-message {
    font-size: 0.875rem;
    font-weight: 500;
}

/* ========== IMAGE MODAL (iOS Save to Photos) ========== */
.image-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s ease;
}

.image-modal-overlay.closing {
    animation: fadeOut 0.2s ease forwards;
}

@keyframes fadeOut {
    to { opacity: 0; }
}

.image-modal {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.image-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.image-modal-title {
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100% - 50px);
}

.image-modal-close {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.image-modal-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.image-modal-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    -webkit-touch-callout: default;
    -webkit-user-select: none;
    user-select: none;
}

.image-modal-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8125rem;
    text-align: center;
    flex-shrink: 0;
}

.image-modal-hint svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
        padding: 120px 24px 60px;
    }

    .hero-subtitle {
        margin: 0 auto 32px;
    }

    .hero-stats {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .pricing-card.featured {
        transform: none;
        order: -1;
    }

    .paired-container {
        padding: 88px 24px 32px;
    }

    .paired-content {
        grid-template-columns: 1fr;
    }

    .upload-zone,
    .file-list {
        min-height: 280px;
    }
}

@media (max-width: 640px) {
    html, body {
        overflow-x: hidden;
    }

    .nav {
        padding: 0 16px;
    }

    .nav-link {
        display: none;
    }

    .nav-divider {
        display: none;
    }

    .hero {
        padding: 100px 16px 40px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.9375rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 16px;
    }

    .stat-divider {
        display: none;
    }

    .card-content {
        padding: 20px;
    }

    .code-digit, .code-input {
        width: 44px;
        height: 52px;
        font-size: 1.25rem;
    }

    .features-section,
    .pricing-section {
        padding: 60px 16px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    /* Paired state mobile fixes */
    .paired-container {
        padding: 72px 12px 16px;
        max-width: 100%;
    }

    .paired-header {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }

    .connection-status {
        font-size: 0.875rem;
    }

    .btn-end {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .paired-content {
        gap: 20px;
    }

    .upload-header,
    .files-header {
        height: auto;
        margin-bottom: 12px;
    }

    .upload-header h3,
    .files-header h3 {
        font-size: 0.9375rem;
    }

    .upload-zone {
        min-height: 200px;
        border-radius: var(--radius);
    }

    .upload-icon svg {
        width: 40px;
        height: 40px;
    }

    .upload-content h3 {
        font-size: 1rem;
    }

    .upload-content p {
        font-size: 0.8125rem;
    }

    .file-list {
        min-height: 200px;
        max-height: 300px;
        padding: 12px;
        border-radius: var(--radius);
    }

    .file-card {
        padding: 10px;
        gap: 10px;
    }

    .file-icon {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .file-icon svg {
        width: 18px;
        height: 18px;
    }

    .file-name {
        font-size: 0.8125rem;
    }

    .file-meta {
        font-size: 0.6875rem;
        gap: 6px;
    }

    .file-download {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    .file-download svg {
        width: 16px;
        height: 16px;
    }

    .encrypted-badge {
        font-size: 0.5625rem;
        padding: 0px 4px;
    }

    /* Storage bar mobile */
    .storage-bar {
        margin-top: 16px;
    }

    .storage-text {
        font-size: 0.75rem;
    }

    /* Upload queue mobile */
    .upload-queue-item {
        padding: 10px;
    }

    .upload-queue-name {
        font-size: 0.8125rem;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .upload-queue-size {
        font-size: 0.6875rem;
    }

    /* Toast mobile */
    .toast-container {
        left: 12px;
        right: 12px;
        top: 12px;
    }

    .toast {
        width: 100%;
        font-size: 0.875rem;
        padding: 12px 16px;
    }

    /* Modal mobile */
    .modal-content {
        margin: 16px;
        max-height: calc(100vh - 32px);
    }

    .auth-perks {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    /* Empty state mobile */
    .empty-state svg {
        width: 48px;
        height: 48px;
    }

    .empty-state p {
        font-size: 0.875rem;
    }

    .empty-state span {
        font-size: 0.75rem;
    }

    /* Account modal mobile */
    .account-section {
        padding: 12px 0;
    }

    .account-section h3 {
        font-size: 0.7rem;
        margin-bottom: 10px;
    }

    .account-email {
        font-size: 0.9rem;
    }

    .account-meta {
        font-size: 0.8rem;
    }

    .plan-card {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .plan-name {
        font-size: 1rem;
    }

    .plan-status {
        font-size: 0.75rem;
    }

    .payment-item {
        padding: 10px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .payment-date {
        font-size: 0.8rem;
    }

    .payment-amount {
        font-size: 0.9rem;
    }

    .btn-cancel,
    .btn-signout {
        font-size: 0.8rem;
        padding: 10px 14px;
    }
}

/* Extra small screens (iPhone SE, small Android) */
@media (max-width: 375px) {
    .paired-container {
        padding: 68px 8px 12px;
    }

    .code-digit, .code-input {
        width: 38px;
        height: 46px;
        font-size: 1.125rem;
    }

    .card-content {
        padding: 16px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .file-card {
        padding: 8px;
        gap: 8px;
    }

    .file-icon {
        width: 32px;
        height: 32px;
    }

    .file-name {
        font-size: 0.75rem;
    }

    .file-meta {
        flex-wrap: wrap;
        gap: 4px;
    }

    .file-download {
        width: 28px;
        height: 28px;
    }

    .upload-queue-name {
        max-width: 100px;
    }

    .connection-status {
        font-size: 0.8125rem;
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
}
