/* ===========================================
   PasteShare - Mobile-First CSS
   TechTools Clipboard Sharing Tool
   =========================================== */

/* CSS Variables */
:root {
    /* Colors - Light Theme */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.1);
    --secondary: #8b5cf6;
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --warning-text: #92400e;
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);

    --bg: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-focus: var(--primary);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Spacing */
    --radius: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --card-bg: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --warning-text: #fbbf24;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.back-link span {
    display: none;
}

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

.logo i {
    font-size: 1.25rem;
    color: var(--primary);
}

.logo h1 {
    font-size: 1.125rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    gap: 8px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

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

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

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-icon-lg {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon-lg:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 16px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* Upload Section */
.upload-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Drop Zone */
.drop-zone {
    background: var(--card-bg);
    border: 2px dashed var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-zone:hover,
.drop-zone:focus {
    border-color: var(--primary);
    background: var(--primary-light);
    outline: none;
}

.drop-zone.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: scale(1.01);
}

.drop-zone-content {
    z-index: 1;
}

.drop-zone-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.drop-zone-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.drop-zone-title kbd {
    display: inline-block;
    padding: 2px 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.875rem;
    border: 1px solid var(--border);
}

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

.drop-zone-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.drop-zone-hint .separator {
    opacity: 0.5;
}

.drop-zone-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.drop-zone-overlay i {
    font-size: 3rem;
    animation: bounce 0.5s ease infinite alternate;
}

.drop-zone.drag-over .drop-zone-overlay {
    opacity: 1;
    visibility: visible;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

/* Mobile/Desktop text visibility */
.desktop-text {
    display: none;
}

.mobile-text {
    display: inline;
}

/* Text Toggle Button */
.text-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.text-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Text Input Area */
.text-input-area {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 16px;
    border: 1px solid var(--border);
}

.text-input-area textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9375rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 180px;
    transition: var(--transition);
}

.text-input-area textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.text-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    justify-content: flex-end;
}

/* Options Panel */
.options-panel {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid var(--border);
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.option-label i {
    color: var(--primary);
}

.select-wrapper {
    position: relative;
}

.option-select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    transition: var(--transition);
}

.option-select:focus {
    outline: none;
    border-color: var(--primary);
}

.select-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Toggle Switch */
.option-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.option-toggle input {
    display: none;
}

.toggle-slider {
    width: 48px;
    height: 26px;
    background: var(--bg-tertiary);
    border-radius: 13px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.option-toggle input:checked + .toggle-slider {
    background: var(--primary);
}

.option-toggle input:checked + .toggle-slider::after {
    transform: translateX(22px);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.toggle-label i {
    color: var(--text-muted);
}

/* Preview Section */
.preview-section {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
}

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

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

.preview-content {
    padding: 20px;
    background: var(--bg-secondary);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-content img {
    max-width: 100%;
    max-height: 50vh;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.preview-content pre {
    width: 100%;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    max-height: 40vh;
    overflow-y: auto;
}

.preview-actions {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.preview-actions .btn {
    width: 100%;
}

/* Success Section */
.success-section {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 32px 20px;
    text-align: center;
    border: 1px solid var(--border);
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--success-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--success);
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.success-subtitle {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.share-link-container {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.share-link-input {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 0.875rem;
    font-family: 'Monaco', 'Menlo', monospace;
    min-width: 0;
}

.share-link-input:focus {
    outline: none;
    border-color: var(--primary);
}

.copy-btn {
    flex-shrink: 0;
}

.share-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.paste-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.info-item i {
    color: var(--primary);
}

.new-paste-btn {
    width: 100%;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 360px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

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

.modal-close {
    background: none;
    border: none;
}

.modal-body {
    padding: 24px;
    text-align: center;
}

.qr-canvas {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.qr-canvas canvas,
.qr-canvas img {
    border-radius: var(--radius);
}

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

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: calc(100% - 40px);
    max-width: 400px;
}

.toast {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    border: 1px solid var(--border);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast i {
    font-size: 1.25rem;
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--danger);
}

.toast span {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* ===========================================
   Desktop Styles (min-width: 640px)
   =========================================== */
@media (min-width: 640px) {
    .header {
        padding: 16px 24px;
    }

    .back-link span {
        display: inline;
    }

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

    .main-content {
        padding: 32px 24px;
    }

    .desktop-text {
        display: inline;
    }

    .mobile-text {
        display: none;
    }

    .drop-zone {
        padding: 60px 40px;
        min-height: 320px;
    }

    .drop-zone-icon {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    .drop-zone-title {
        font-size: 1.5rem;
    }

    .options-panel {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .option-group {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .option-select {
        width: auto;
        min-width: 140px;
    }

    .success-section {
        padding: 48px 40px;
    }

    .share-link-container {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }

    .paste-info {
        flex-direction: row;
        justify-content: center;
        gap: 24px;
    }

    .new-paste-btn {
        width: auto;
    }
}

/* ===========================================
   Large Desktop (min-width: 1024px)
   =========================================== */
@media (min-width: 1024px) {
    .main-content {
        padding: 48px 32px;
    }

    .drop-zone {
        padding: 80px 60px;
        min-height: 380px;
    }
}

/* ===========================================
   Reduced Motion
   =========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===========================================
   Touch Device Optimizations
   =========================================== */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }

    .btn-icon-lg:hover {
        transform: none;
    }

    .drop-zone:hover {
        border-color: var(--border);
        background: var(--card-bg);
    }

    .drop-zone:active {
        border-color: var(--primary);
        background: var(--primary-light);
    }
}

/* ===========================================
   Safe Area Insets (for notched devices)
   =========================================== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .toast-container {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

/* ===========================================
   Accessibility: Visually Hidden
   =========================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===========================================
   Features Section (SEO)
   =========================================== */
.features-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.features-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    color: var(--text);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

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

@media (min-width: 640px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .feature-card {
        padding: 28px 20px;
    }
}

/* ===========================================
   FAQ Section (SEO)
   =========================================== */
.faq-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.faq-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    color: var(--text);
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.faq-item summary {
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    transition: var(--transition);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--primary);
    transition: var(--transition);
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary:hover {
    background: var(--bg-secondary);
}

.faq-answer {
    padding: 0 20px 20px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-answer p {
    margin: 0;
}

.faq-answer strong {
    color: var(--text);
}

/* ===========================================
   Footer (SEO)
   =========================================== */
.footer {
    margin-top: 48px;
    padding: 24px 16px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.footer-content p:first-child {
    margin-bottom: 4px;
}

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

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

.footer-tagline {
    font-size: 0.8125rem !important;
    color: var(--text-muted) !important;
}

/* Logo text for header */
.logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (min-width: 640px) {
    .logo-text {
        font-size: 1.25rem;
    }
}

/* ===========================================
   File Preview Styles
   =========================================== */
.file-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
}

.file-preview-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-light), rgba(139, 92, 246, 0.1));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 2.5rem;
    color: var(--primary);
}

.file-preview-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-preview-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
    max-width: 300px;
}

.file-preview-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.file-preview-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.file-preview-meta i {
    color: var(--primary);
}

/* View page file display */
.view-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 20px;
    text-align: center;
    background: var(--bg-secondary);
}

.view-file-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-light), rgba(139, 92, 246, 0.15));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 3rem;
    color: var(--primary);
    box-shadow: var(--shadow);
}

.view-file-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    word-break: break-word;
    max-width: 400px;
}

.view-file-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.view-file-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-file-info i {
    color: var(--primary);
}

.view-file-download {
    padding: 14px 28px;
    font-size: 1rem;
}

/* Audio/Video preview containers */
.view-audio,
.view-video {
    padding: 24px;
    background: var(--bg-secondary);
    text-align: center;
}

.view-audio audio,
.view-video video {
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.view-video video {
    max-height: 70vh;
}

/* PDF preview */
.view-pdf {
    padding: 0;
}

.view-pdf embed,
.view-pdf iframe {
    width: 100%;
    height: 80vh;
    border: none;
}

@media (min-width: 640px) {
    .file-preview {
        padding: 60px 40px;
    }

    .file-preview-icon {
        width: 120px;
        height: 120px;
        font-size: 3rem;
    }

    .file-preview-name {
        font-size: 1.25rem;
        max-width: 400px;
    }

    .view-file-icon {
        width: 140px;
        height: 140px;
        font-size: 3.5rem;
    }

    .view-file-name {
        font-size: 1.5rem;
        max-width: 500px;
    }
}
