:root {
    --bg-dark: #0f1115;
    --bg-panel: #161b22;
    --bg-panel-hover: #1c2128;
    --primary: #58a6ff;
    --primary-hover: #79c0ff;
    --accent: #238636;
    --accent-hover: #2ea043;
    --accent-danger: #da3633;
    --accent-danger-hover: #f85149;
    --text-main: #c9d1d9;
    --text-muted: #8b949e;
    --border-color: #30363d;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-stack);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Utility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    white-space: nowrap;
    clip-path: inset(100%);
    clip: rect(0 0 0 0);
    overflow: hidden;
}

/* --- Layout --- */
.workspace-container {
    max-width: 1600px; /* Wider canvas */
    margin: 40px auto;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    gap: 40px; /* More breathing room */
    flex: 1;
    width: 100%;
    position: relative;
    /* Ensure footer pushes down if content is short */
    min-height: calc(100vh - 160px);
}

/* Header */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    background-color: #0d1117; /* Solid Dark Background to match reference */
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-size: 24px;
}

.logo-text {
    font-weight: 700;
    font-size: 20px;
    color: #fff;
    letter-spacing: 0.5px;
}

/* Info Capsules */
.info-capsule {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(22, 27, 34, 0.5); /* Slightly transparent */
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 13px;
    transition: all 0.2s ease;
}

.info-capsule:hover {
    border-color: var(--text-muted);
    background: var(--bg-panel);
}

.capsule-label {
    color: var(--text-muted);
    font-weight: 500;
}

.capsule-value {
    color: #fff;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.user-capsule {
    cursor: pointer;
}

.subscription-capsule .capsule-value {
    color: var(--accent);
    text-transform: uppercase;
}

.balance-capsule .capsule-value {
    color: var(--primary);
}

/* Mini Lang Switcher */
.lang-switcher-mini {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 12px;
}

.lang-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.lang-link:hover, .lang-link.active {
    color: var(--primary);
}

.divider {
    color: var(--border-color);
}

.logout-btn-mini {
    color: var(--text-muted);
    font-size: 16px;
    transition: color 0.2s;
    margin-left: 8px;
}

.logout-btn-mini:hover {
    color: var(--accent-danger);
}

.balance-badge {
    background: rgba(88, 166, 255, 0.1);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(88, 166, 255, 0.2);
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.user-profile-trigger:hover {
    background: var(--bg-panel-hover);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

/* Main Workspace */
.workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Drop Zone Container */
.drop-zone-container {
    width: 100%;
    perspective: 1000px; /* For potential 3D effects */
}

.drop-zone {
    border: 2px dashed rgba(88, 166, 255, 0.2); /* Subtle blue dash */
    border-radius: 24px; /* More rounded */
    background: linear-gradient(165deg, rgba(22, 27, 34, 0.9) 0%, rgba(13, 17, 23, 0.95) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 45px 40px; /* Reduced vertical padding by 25% (was 60px) */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-height: 210px; /* Reduced min-height by 25% (was 280px) */
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.drop-zone::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(88, 166, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
    transition: opacity 0.5s;
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(22, 27, 34, 1);
    transform: translateY(-4px) scale(1.005);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(88, 166, 255, 0.1);
}

.drop-zone.drag-over * {
    pointer-events: none;
}

.drop-content {
    z-index: 2;
}

.upload-icon {
    font-size: 36px; /* Reduced by 25% (was 48px) */
    color: var(--primary);
    margin-bottom: 12px; /* Adjusted margin proportionately */
    filter: drop-shadow(0 0 10px rgba(88, 166, 255, 0.4));
}

.drop-zone h3 {
    margin: 0 0 6px 0; /* Adjusted margin */
    font-size: 15px; /* Reduced by 25% (was 20px) */
    color: #fff;
    font-weight: 600;
}

.support-text {
    margin: 0 0 15px 0; /* Adjusted margin */
    font-size: 11px; /* Reduced proportionately (was 14px) */
    color: var(--text-muted);
}

.input-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.camera-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    height: 42px; /* Match select-btn height approx */
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}

.camera-btn i {
    font-size: 1.1em;
}

.camera-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(88, 166, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.select-btn {
    display: inline-block;
    background: var(--bg-panel-hover);
    border: 1px solid var(--border-color);
    color: var(--primary);
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.select-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(88, 166, 255, 0.3);
}

.browse-btn {
    margin-top: 16px;
    background: var(--bg-panel-hover);
    border: 1px solid var(--border-color);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.browse-btn:hover {
    background: var(--bg-dark);
    border-color: var(--primary);
}

/* Action Bar */
.action-bar {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    align-items: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.main-action-btn {
    background: linear-gradient(90deg, var(--primary) 0%, #2f81f7 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(88, 166, 255, 0.3);
}

.main-action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 166, 255, 0.4);
    filter: brightness(1.1);
}

.main-action-btn:disabled, .disabled-btn {
    opacity: 0.5;
    cursor: not-allowed;
    background: #6c757d !important; /* Force gray color */
    color: #fff !important;
    box-shadow: none !important;
    transform: none !important;
}

.download-all-btn {
    background: var(--accent);
    color: #fff;
}

.download-all-btn:hover {
    background: var(--accent-hover);
}

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

.secondary-action-btn:hover {
    border-color: var(--text-main);
    color: var(--text-main);
    background: var(--bg-panel-hover);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-panel-hover);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-main);
}

/* File Queue Section */
.file-queue-section {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    min-height: 400px;
}

.section-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header h2 {
    margin: 0;
    font-size: 18px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: var(--text-muted);
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    align-items: stretch;
    width: 100%;
}

/* File Card (Refined) */
.file-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-radius: 50px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    min-height: 32px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    transition: all 0.2s ease;
    overflow: hidden;
}

.file-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-color: var(--primary);
}

.card-status-strip {
    height: 100%;
    width: 3px;
    background: transparent;
    transition: background 0.3s;
    position: absolute;
    left: 0;
    top: 0;
}

.file-card.processing .card-status-strip { background: var(--primary); }
.file-card.success .card-status-strip { background: var(--accent); }
.file-card.error .card-status-strip { background: var(--accent-danger); }

.card-header {
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.file-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-muted);
}

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

.file-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.file-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.remove-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    opacity: 0.5;
    transition: all 0.2s;
}

.remove-btn:hover {
    opacity: 1;
    color: var(--accent-danger);
    transform: scale(1.1);
}

.card-body {
    padding: 0 16px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-badge {
    align-self: flex-start;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg-panel-hover);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.progress-container {
    height: 4px;
    background: var(--bg-dark);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0;
    opacity: 0; /* Hidden by default */
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

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

.progress-bar.loading {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
    animation: progress-stripe 1s linear infinite;
}

@keyframes progress-stripe {
    from { background-position: 1rem 0; }
    to { background-position: 0 0; }
}

/* Card States */
.file-card.processing .status-badge {
    background: rgba(88, 166, 255, 0.15);
    color: var(--primary);
    border-color: rgba(88, 166, 255, 0.3);
}

.file-card.success {
    border-color: var(--accent);
}

.file-card.success .status-badge {
    background: rgba(35, 134, 54, 0.15);
    color: var(--accent);
    border-color: rgba(35, 134, 54, 0.3);
}

.file-card.error {
    border-color: var(--accent-danger);
}

.file-card.error .status-badge {
    background: rgba(218, 54, 51, 0.15);
    color: var(--accent-danger);
    border-color: rgba(218, 54, 51, 0.3);
}

/* Actions */
.card-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: var(--accent);
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

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

.secondary-action-btn {
    background: var(--bg-panel-hover);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    height: 32px;
    padding: 0 12px;
}
.secondary-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}


/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Z-Index Fix for Legal Modals (Terms & Privacy) to show ABOVE Profile (1000) AND Pricing (10001) */
#termsModal, #privacyModal {
    z-index: 20000 !important;
}

/* Pricing Modal Z-Index (High Priority) */
#pricingModal {
    z-index: 10001 !important;
}

/* Base Modal Content (retained for Profile Modal inheritance, though Profile overrides most) */
.modal-content {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    width: 400px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    position: relative;
}

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

/* Generic modal styles kept for Profile Modal usage */
.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.close-modal-btn:hover {
    color: #fff;
}

.modal-body {
    margin-bottom: 24px;
    color: var(--text-main);
    font-size: 14px;
}

/* Text Modal Specifics (Terms, Privacy) */
.text-modal-content {
    width: 800px;
    max-width: 95vw; /* Mobile responsive width */
    background: var(--bg-panel);
    display: flex;
    flex-direction: column;
    max-height: 85vh; /* Ensure it fits on mobile screens */
    border-radius: 12px; /* Consistent rounded corners */
}

.text-modal-content .modal-body {
    overflow-y: auto;
    padding-right: 8px; /* For scrollbar space */
    line-height: 1.6;
    color: var(--text-main);
}

.text-modal-content h4 {
    color: #fff;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.text-modal-content ul {
    padding-left: 20px;
}

.text-modal-content li {
    margin-bottom: 5px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

/* Profile Modal Specifics - Reverted to Glassmorphism & Horizontal Cards */
.profile-modal-content {
    width: 600px; /* Wider for horizontal cards */
    background: rgba(13, 17, 23, 0.85); /* Glassmorphism base */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.profile-section {
    margin-bottom: 24px;
}

.profile-section h4 {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3); /* Dark input background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

/* Horizontal Plan Cards */
.plan-cards {
    display: flex;
    flex-direction: row; /* Horizontal */
    gap: 16px;
    margin-top: 16px;
    overflow-x: auto; /* Scroll if needed on small screens */
}

.plan-card {
    flex: 1;
    background: rgba(22, 27, 34, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.plan-card:hover {
    transform: translateY(-4px);
    background: rgba(22, 27, 34, 0.9);
    border-color: var(--text-muted);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Neon Glow for Active Plan */
.plan-card.active-plan {
    border-color: var(--primary);
    background: rgba(88, 166, 255, 0.05);
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.15), inset 0 0 0 1px rgba(88, 166, 255, 0.1);
}

.plan-card.active-plan::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.plan-info {
    text-align: center;
    margin-bottom: 12px;
}

.plan-name {
    font-weight: 700;
    font-size: 15px;
    display: block;
    margin-bottom: 4px;
    color: #fff;
}

.plan-price {
    font-size: 13px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.plan-select-btn {
    width: 100%;
    font-size: 12px;
    padding: 6px 0;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.plan-card:hover .plan-select-btn {
    border-color: var(--text-main);
    color: var(--text-main);
}

.active-plan .plan-select-btn {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(88, 166, 255, 0.4);
}

/* Balance Section */
.balance-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

.balance-amount {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
}

.currency {
    color: var(--text-muted);
    font-size: 14px;
    margin-right: auto;
}

/* Credit Packages (Modern SaaS Style) */
.credit-packages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.credit-package-btn {
    background: linear-gradient(145deg, rgba(22, 27, 34, 0.8) 0%, rgba(13, 17, 23, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: visible; /* Allow glow overlap */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.credit-package-btn:hover {
    transform: translateY(-6px);
    border-color: rgba(88, 166, 255, 0.5);
    background: linear-gradient(145deg, rgba(30, 35, 45, 0.9) 0%, rgba(20, 25, 35, 1) 100%);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4), 0 0 15px rgba(88, 166, 255, 0.1);
}

.credit-package-btn.selected {
    border-color: var(--primary);
    background: rgba(22, 27, 34, 0.9);
    box-shadow: 0 0 0 2px var(--primary), 0 12px 30px rgba(88, 166, 255, 0.15);
    z-index: 2;
}

.pkg-credits {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.pkg-price {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
    opacity: 0.9;
}

.pkg-label {
    font-size: 10px;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1.2px;
    margin-top: 16px;
    padding: 6px 10px;
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 6px;
}

/* Featured Package Style (Best Value) */
.pkg-featured {
    border-color: rgba(35, 134, 54, 0.4);
    background: linear-gradient(160deg, rgba(22, 27, 34, 0.9) 0%, rgba(13, 17, 23, 0.95) 100%);
    position: relative;
}

.pkg-featured::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(35, 134, 54, 0.6) 0%, transparent 80%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.pkg-featured:hover {
    border-color: var(--accent);
    box-shadow: 0 15px 35px rgba(35, 134, 54, 0.15);
    transform: translateY(-8px);
}

.pkg-featured.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent), 0 15px 40px rgba(35, 134, 54, 0.25);
}

.pkg-featured .pkg-label {
    color: #fff;
    background: linear-gradient(90deg, #2ea043 0%, #238636 100%);
    border: none;
    box-shadow: 0 4px 10px rgba(35, 134, 54, 0.3);
}

/* Payment Agreement */
.payment-agreement {
    margin: 24px 0;
    display: flex;
    justify-content: center;
}

.checkbox-container {
    display: flex;
    align-items: center; /* Center vertically */
    gap: 14px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    user-select: none;
    text-align: left;
    padding: 10px 14px;
    border-radius: 8px;
    transition: background 0.2s;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.checkbox-container:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.05);
}

.checkbox-container input {
    display: none;
}

.checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--text-main);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: scale(1.1);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.agreement-text a {
    color: var(--primary);
    text-decoration: none;
    position: relative;
    transition: color 0.2s;
}

.agreement-text a::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 1px;
    background: currentColor;
    opacity: 0.3;
    transition: opacity 0.2s;
}

.agreement-text a:hover {
    color: var(--primary-hover);
}

.agreement-text a:hover::after {
    opacity: 1;
}

/* Pay Button (Modern) */
.pay-action-btn {
    width: 100%;
    padding: 18px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.8px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); /* Blue to Purple Gradient */
    color: #fff;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
    border: none;
    margin-top: 12px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.pay-action-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.pay-action-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}

.pay-action-btn:disabled {
    background: #21262d;
    color: #484f58;
    box-shadow: none;
    cursor: not-allowed;
    border: 1px solid #30363d;
    transform: none;
}

/* Lock icon inside button */
.pay-action-btn i {
    font-size: 18px;
    opacity: 0.8;
}



/* --- Correction Studio (Replaces Preview Modal) --- */

.correction-studio-modal {
    width: 98vw;
    height: 95vh;
    max-width: none; /* Full width */
    background: #0d1117;
    border: 1px solid #30363d;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

/* Header */
.studio-header {
    height: 60px;
    background: #161b22;
    border-bottom: 1px solid #30363d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}

.studio-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.studio-icon {
    font-size: 20px;
    color: var(--primary);
}

.studio-info h3 {
    margin: 0;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
}

.filename-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
}

.studio-actions {
    display: flex;
    gap: 12px;
}

/* Studio Buttons */
.btn-export {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(35, 134, 54, 0.3);
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-size: 13px;
}

.btn-export:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(35, 134, 54, 0.4);
}

.btn-reset {
    background: #21262d;
    border: 1px solid #30363d;
    color: var(--text-muted);
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-reset:hover {
    background: #30363d;
    color: #c9d1d9;
    border-color: #8b949e;
}

.btn-close-studio {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-close-studio:hover {
    background: #da3633;
    color: white;
}


/* Body (Split View) */
.studio-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
    background: #0d1117;
}

.studio-panel {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.left-panel {
    width: 40%; /* Initial split */
    border-right: 1px solid #30363d;
    background: #0f1115;
}

.right-panel {
    flex: 1;
    background: #0d1117;
}

/* Panel Headers */
.panel-header {
    height: 40px;
    background: #161b22;
    border-bottom: 1px solid #30363d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    flex-shrink: 0;
}

/* Zoom Controls */
.zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #21262d;
    padding: 2px 4px;
    border-radius: 4px;
}

.zoom-controls button {
    background: none;
    border: none;
    color: #c9d1d9;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 2px;
}

.zoom-controls button:hover {
    background: #30363d;
    color: #fff;
}

#zoomLevel {
    min-width: 40px;
    text-align: center;
}

/* Content Areas */
.panel-content {
    flex: 1;
    overflow: auto;
    position: relative;
    height: 100%; /* Important for embed */
}

#sourceContainer {
    display: flex;
    align-items: flex-start; /* Allow scroll */
    justify-content: flex-start;
    overflow: auto;
    background-image:
        linear-gradient(45deg, #161b22 25%, transparent 25%),
        linear-gradient(-45deg, #161b22 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #161b22 75%),
        linear-gradient(-45deg, transparent 75%, #161b22 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

#sourceImage {
    max-width: 100%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    transform-origin: top left;
    transition: transform 0.1s ease-out; /* Smooth zoom */
    margin: 20px; /* Spacing */
}

/* Embed PDF Styles */
embed {
    display: block;
    width: 100%;
    height: 100%;
}

/* Editable Table Styles */
#tableEditor {
    padding: 20px;
    min-height: 100%;
}

.studio-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    background: #0d1117;
}

.studio-table th {
    background: #161b22;
    position: sticky;
    top: 0;
    border: 1px solid #30363d;
    padding: 8px 12px;
    text-align: left;
    color: #8b949e;
    font-weight: 600;
    user-select: none;
    z-index: 10;
}

.studio-table td {
    border: 1px solid #30363d;
    padding: 8px 12px;
    color: #c9d1d9;
    min-width: 100px;
    position: relative;
}

/* Input Simulation */
.studio-table td:focus-within {
    border: 1px solid var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.cell-input {
    width: 100%;
    background: transparent;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    outline: none;
    padding: 0;
    margin: 0;
    resize: none; /* For textareas if used */
    overflow: hidden;
}

.studio-table tr:nth-child(even) {
    background: rgba(22, 27, 34, 0.3);
}

.studio-table tr:hover {
    background: rgba(88, 166, 255, 0.05);
}

/* Resizer */
.gutter {
    width: 8px;
    background: #0d1117;
    border-left: 1px solid #30363d;
    border-right: 1px solid #30363d;
    cursor: col-resize;
    flex-shrink: 0;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.gutter::after {
    content: '⋮';
    color: #484f58;
    font-weight: bold;
}

.table-tools button {
    background: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}

.table-tools button:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* --- Mobile Optimization (Mobile First Approach) --- */
@media (max-width: 768px) {
    /* 1. Layout Adjustments */
    .workspace-container {
        padding: 0 16px; /* Reduce side padding */
        margin: 16px auto; /* Reduce top/bottom margin */
        gap: 20px; /* Reduce gap between elements */
    }

    /* 2. Header Adjustments */
    .main-header {
        padding: 12px 16px; /* Smaller padding */
        flex-direction: column; /* Stack on very small screens if needed, or wrap */
        gap: 12px;
        height: auto;
    }

    .header-left {
        width: 100%;
        justify-content: space-between; /* Logo left, maybe something right? */
    }

    .header-right {
        width: 100%;
        justify-content: space-between; /* Spread capsules */
        gap: 8px;
        flex-wrap: wrap; /* Allow wrapping */
    }

    /* Compact Capsules for Mobile */
    .info-capsule {
        padding: 12px; /* Larger touch target */
        font-size: 12px;
        flex: 1; /* Distribute space evenly */
        justify-content: center;
        min-width: auto; /* Allow shrinking */
        min-height: 44px; /* Minimum touch target size */
    }

    .capsule-label {
        display: none; /* Hide labels to save space */
    }

    .capsule-value {
        font-size: 14px; /* Readable size */
    }

    .logout-btn-mini {
        padding: 12px;
        margin-left: 0;
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 3. Drop Zone */
    .drop-zone {
        padding: 24px 16px;
        min-height: 200px;
    }

    .upload-icon {
        font-size: 32px;
    }

    .drop-zone h3 {
        font-size: 18px;
    }

    .input-actions {
        flex-direction: column; /* Stack buttons */
        width: 100%;
        gap: 12px;
    }

    .select-btn, .camera-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        height: 48px; /* Touch target */
        font-size: 16px; /* Prevent zooming on iOS */
    }

    /* 4. Action Bar */
    .action-bar {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
        height: 48px; /* Touch target */
        font-size: 16px;
    }

    /* 5. File Queue Grid */
    .file-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
    
    .file-queue-section {
        padding: 16px; /* Reduce padding */
        min-height: auto;
    }

    .file-card {
        margin-bottom: 0;
    }
    
    /* Ensure action buttons in cards are touch-friendly */
    .remove-btn {
        padding: 12px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .download-btn {
        display: none !important;
    }

    /* 6. Profile Modal */
    .profile-modal-content {
        width: 100%; /* Full width */
        height: 100%; /* Full height */
        max-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        padding: 0;
        margin: 0;
    }
    
    .profile-modal-content .modal-header {
        padding: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        flex-shrink: 0;
    }
    
    .profile-modal-content .modal-body {
        padding: 16px;
        overflow-y: auto; /* Scrollable body */
        flex: 1;
        margin-bottom: 0;
    }
    
    .close-modal-btn {
        padding: 12px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .credit-packages {
        grid-template-columns: 1fr; /* Stack packages */
        gap: 16px;
    }
    
    .credit-package-btn {
        min-height: 120px;
        padding: 20px;
    }
    
    .plan-cards {
        flex-direction: column; /* Stack plan cards if they exist */
    }
    
    /* Payment agreement touch target */
    .checkbox-container {
        padding: 12px;
    }
    
    .pay-action-btn {
        height: 56px;
        font-size: 18px;
    }

    /* 7. Correction Studio */
    .correction-studio-modal {
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
    }
    
    .studio-body {
        flex-direction: column;
    }

    .studio-panel.left-panel {
        width: 100%;
        height: 35%; /* Smaller source view */
        border-right: none;
        border-bottom: 1px solid #30363d;
    }
    
    .studio-panel.right-panel {
        width: 100%;
        height: 65%; /* Larger table view */
    }

    .gutter {
        display: none; /* Hide resizer on mobile */
    }

    .studio-header {
        padding: 0 12px;
        height: 56px;
    }
    
    .studio-info h3 {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }
    
    .filename-badge {
        display: none; /* Hide filename if tight */
    }
    
    .studio-actions {
        gap: 8px;
    }
    
    .studio-actions .btn-export {
        padding: 8px 12px;
        font-size: 12px;
        height: 36px;
    }
    
    .studio-actions .btn-reset {
        display: none; /* Hide reset to save space */
    }
    
    .btn-close-studio {
        padding: 8px;
        min-width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Table optimizations for touch */
    .studio-table td {
        min-width: 120px; /* Ensure columns are wide enough to tap */
        height: 44px; /* Touch target height */
    }
    
    .cell-input {
        font-size: 14px; /* Prevent zoom */
    }
}

/* --- Features Section --- */
.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    background: linear-gradient(165deg, rgba(22, 27, 34, 0.9) 0%, rgba(13, 17, 23, 0.95) 100%);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(88, 166, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--primary);
}

.feature-card h3 {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    color: #fff;
    font-weight: 600;
}

.feature-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- FAQ Section --- */
.faq-section {
    margin-top: 20px;
    background: var(--bg-panel); /* Consistent with other panels */
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
}

.faq-title {
    font-size: 1.75rem;
    color: #fff;
    margin: 0 0 30px 0;
    text-align: center;
    font-weight: 700;
}

.faq-item {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
}

.faq-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.faq-item h3 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    color: var(--primary); /* Highlight questions */
    font-weight: 600;
}

.faq-item div[itemprop="text"] {
    color: var(--text-main);
    line-height: 1.6;
    font-size: 1rem;
}

/* Mobile Optimizations for New Sections */
@media (max-width: 768px) {
    .features-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .faq-section {
        padding: 24px;
    }

    .faq-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
}


/* Extra small screens adjustments */
@media (max-width: 380px) {
    .header-right {
        justify-content: center;
    }
    
    .info-capsule {
        flex: 100%; /* Stack capsules fully */
        margin-bottom: 4px;
    }
    
    .workspace-container {
        padding: 0 12px;
    }
    
    .credit-packages {
        gap: 12px;
    }
}

/* =========================================
   FOOTER STYLES (Strict Row Layout)
   ========================================= */
.main-footer {
    background-color: #0d1117;
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    margin-top: auto;
    width: 100%;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-direction: row; /* FORCE ROW */
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* Left: Copyright & Seller */
.footer-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.copyright {
    margin: 0;
    font-weight: 600;
    color: var(--text-main);
}

.footer-seller-info {
    font-size: 11px;
    opacity: 0.6;
}

/* Center: Links */
.footer-center {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-center a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-center a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.divider {
    color: var(--border-color);
}

/* Right: Payment Icons */
.footer-right {
    display: flex;
    align-items: center;
}

.payment-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Force icon sizes - 28px as requested */
.payment-icons i,
.payment-icons img {
    height: 28px;
    width: auto;
    font-size: 28px; /* For font icons */
    line-height: 1;
    display: block;
    transition: transform 0.2s;
}

/* Visa - White on dark background */
.payment-icons .fa-cc-visa {
    color: #fff;
}

/* Mastercard - Brand Orange */
.payment-icons .fa-cc-mastercard {
    color: #ff5f00;
}

/* Remove any filters/colors for image icons (Mir) */
.mir-icon {
    height: 28px;
    width: auto;
    border-radius: 2px; /* Slight rounding if needed */
    background: #fff; /* White background to make the colored logo pop correctly on dark footer */
    padding: 2px 4px; /* Tiny padding */
}

.payment-icons i:hover,
.payment-icons img:hover {
    transform: scale(1.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 24px;
    }

    .footer-left {
        align-items: center;
        text-align: center;
    }

    .footer-center {
        flex-direction: column;
        gap: 10px;
    }

    .footer-center .divider {
        display: none;
    }
}

/* =========================================
   AUTH GLASSMORPHISM (Register/Login)
   ========================================= */
.auth-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-dark);
    /* Optional: Subtle gradient background for depth */
    background: radial-gradient(circle at top right, #1a1f2e 0%, #0f1115 100%);
}

.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-glass-card {
    width: 100%;
    max-width: 420px;
    background: rgba(22, 27, 34, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.auth-title-large {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 30px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
    text-align: left;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s;
}

.auth-input {
    width: 100%;
    background: rgba(13, 17, 23, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 16px 12px 42px; /* Space for icon */
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s ease;
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
    background: rgba(13, 17, 23, 1);
}

.auth-input:focus + .input-icon {
    color: var(--primary);
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    filter: brightness(1.1);
}

.auth-footer-link {
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

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

.auth-footer-link a:hover {
    text-decoration: underline;
}

/* Alert Styling for Auth */
.auth-alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.auth-alert.error {
    background: rgba(218, 54, 51, 0.15);
    border: 1px solid rgba(218, 54, 51, 0.3);
    color: #f85149;
}

.auth-alert.success {
    background: rgba(35, 134, 54, 0.15);
    border: 1px solid rgba(35, 134, 54, 0.3);
    color: #3fb950;
}

/* Auth Modals (Glassmorphism) */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal-overlay.show {
    display: flex;
    opacity: 1;
}

.auth-modal-content {
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    background: rgba(22, 27, 34, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    position: relative;
    overflow-y: auto;
    color: var(--text-main);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.auth-modal-overlay.show .auth-modal-content {
    transform: translateY(0);
}

.auth-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.auth-modal-close:hover {
    color: #fff;
}

.auth-modal-body h2 {
    font-size: 18px;
    color: #fff;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
}

.auth-modal-body p, .auth-modal-body li {
    font-size: 14px;
    line-height: 1.6;
    color: #b0b8c3;
    margin-bottom: 10px;
}

.no-copy {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.no-copy [contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
