:root {
    --bg-color: #0f0f13;
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary-color: #6c5ce7;
    --primary-hover: #a29bfe;
    --danger-color: #ff7675;
    --accent-gradient: linear-gradient(135deg, #6c5ce7 0%, #00cec9 100%);
    --success-color: #00b894;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(108, 92, 231, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 206, 201, 0.15) 0%, transparent 25%);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(108, 92, 231, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(108, 92, 231, 0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

/* Landing View */
#landing-view {
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

h1 {
    font-size: 3.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    font-weight: 800;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
    white-space: nowrap;
    min-width: 140px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.5);
    animation: pulse 1.5s infinite;
}

/* Space View */
#space-view {
    display: none;
    /* Hidden by default */
    width: 100%;
    height: 100%;
    /* Flex row for desktop */
    flex-direction: row;
}

/* Hide mobile controls on desktop */
.sidebar-toggle,
.sidebar-close,
.sidebar-overlay,
.app-name {
    display: none;
}

/* Left Sidebar (Info) */
.sidebar {
    width: 350px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    z-index: 10;
}

.qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 2rem;
}

.qr-container {
    background: white;
    padding: 1rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-container img {
    width: 200px;
    height: 200px;
    display: block;
}

.share-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.info-block {
    text-align: center;
    width: 100%;
}

.link-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 1rem;
}

.space-link {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.8rem;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #a29bfe;
    border: 1px solid var(--glass-border);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    cursor: pointer;
}

.link-container .icon-btn-small {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.link-container .icon-btn-small:hover {
    background: rgba(255, 255, 255, 0.2);
}

.timer {
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin: 1rem 0 0.5rem 0;
}

/* Usage Bar */
.usage-container {
    width: 100%;
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

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

.usage-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
}

.btn-destroy {
    background: rgba(255, 118, 117, 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    width: 100%;
}

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

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

.modal {
    background: #2d3436;
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    text-align: center;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease-out;
}

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

.modal p {
    color: #b2bec3;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: nowrap;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    min-width: 100px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Password Input Styles */
.password-input-container {
    position: relative;
    width: 100%;
    margin: 1.5rem 0;
}

.password-input {
    width: 100%;
    padding: 0.9rem 3rem 0.9rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.password-input:focus {
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.password-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.toggle-password-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

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

.password-error {
    color: var(--danger-color);
    font-size: 0.9rem;
    margin-top: -1rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease-out;
}


/* Toast System */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 50vh;
    /* Limit height */
    overflow: hidden;
    /* Prevent covering screen */
    pointer-events: none;
    /* Let clicks pass through if transparent */
}

.toast {
    background: rgba(45, 52, 54, 0.95);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    min-width: 250px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideInRight 0.3s ease-out;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    /* re-enable clicks */
    flex-shrink: 0;
}

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

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

/* Right Content (Uploads) */
.main-content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    overflow: auto;
    position: relative;
}

.upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s;
    cursor: pointer;
    margin-bottom: 2rem;
    flex-shrink: 0;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(108, 92, 231, 0.05);
}

.upload-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* File Card Design */
.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    padding-bottom: 2rem;
    width: 100%;
}

.file-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.file-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    border-color: rgba(108, 92, 231, 0.4);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.file-actions-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
}

.delete-btn-corner {
    background: rgba(255, 118, 117, 0.1);
    border: 1px solid rgba(255, 118, 117, 0.2);
    color: var(--danger-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(5px);
    opacity: 0;
    transform: scale(0.8);
}

.file-card:hover .delete-btn-corner {
    opacity: 1;
    transform: scale(1);
}

.delete-btn-corner:hover {
    background: var(--danger-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(255, 118, 117, 0.3);
}

.file-preview {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 12px;
    background: #2d3436;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    transition: transform 0.3s;
}

.file-card:hover .file-preview {
    transform: scale(1.02);
}

.file-info {
    flex: 1;
    padding: 0 4px;
    margin-bottom: 12px;
}

.file-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.file-size {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.download-btn-primary {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.3);
    color: var(--primary-color);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    margin-top: auto;
}

.download-btn-primary:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

/* Mobile: Always show delete button */
@media (hover: none) {
    .delete-btn-corner {
        opacity: 1;
        transform: scale(1);
        background: rgba(45, 52, 54, 0.8);
    }
}

/* ===== MOBILE RESPONSIVE STYLES ===== */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .sidebar {
        width: 300px;
        padding: 1.5rem;
    }

    .qr-container img {
        width: 160px;
        height: 160px;
    }

    .file-list {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
}

/* Tablets */
@media (max-width: 768px) {
    body {
        overflow: auto;
    }

    .container {
        height: auto;
        min-height: 100vh;
    }

    h1 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    .btn-primary {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    #space-view {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        padding: 1.5rem;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
        align-items: flex-start;
        gap: 1rem;
    }

    .qr-section {
        flex: 1;
        min-width: 200px;
        margin-bottom: 0;
    }

    .qr-container img {
        width: 140px;
        height: 140px;
    }

    .info-block {
        flex: 1;
        min-width: 200px;
    }

    .space-link {
        max-width: 150px;
        font-size: 0.8rem;
    }

    .timer {
        font-size: 1.5rem;
    }

    .btn-destroy {
        width: 100%;
        margin-top: 1rem;
    }

    .main-content {
        padding: 1.5rem;
    }

    .upload-area {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .upload-icon {
        font-size: 2rem;
    }

    .file-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .file-preview {
        height: 100px;
        font-size: 2rem;
    }

    .modal {
        width: 95%;
        margin: 1rem;
        padding: 1.5rem;
    }

    .modal-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-secondary,
    .btn-destroy {
        width: 100%;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .btn-primary {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Mobile sidebar toggle */
    .sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--glass-border);
        border-right: none;
        padding: 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 1.5rem;
        z-index: 1000;
        transition: right 0.3s ease;
        overflow-y: auto;
    }

    .sidebar.open {
        right: 0;
    }

    /* App Name in Top Left */
    .app-name {
        position: fixed;
        top: 1rem;
        left: 1rem;
        font-size: 1.5rem;
        font-weight: 700;
        background: var(--accent-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        z-index: 1001;
        display: block;
        letter-spacing: 0.5px;
        transition: opacity 0.3s ease;
    }

    /* Hide app name when sidebar is open */
    .app-name.hidden {
        opacity: 0;
        pointer-events: none;
    }

    /* Mobile sidebar toggle button - RIGHT SIDE */
    .sidebar-toggle {
        position: fixed;
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        background: var(--glass-bg);
        backdrop-filter: blur(10px);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        color: var(--text-color);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1001;
        transition: all 0.2s;
    }

    /* Hide toggle button when sidebar is open */
    .sidebar-toggle.hidden {
        opacity: 0;
        pointer-events: none;
    }

    .sidebar-toggle:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .sidebar-toggle svg {
        width: 20px;
        height: 20px;
    }

    /* Sidebar overlay */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        display: block;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Reset sidebar content for mobile */
    .qr-section {
        width: 100%;
        margin-bottom: 1rem;
    }

    .qr-container {
        padding: 1rem;
    }

    .qr-container img {
        width: 150px;
        height: 150px;
    }

    .share-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        gap: 8px;
        width: 100%;
        justify-content: center;
    }

    .share-btn svg {
        width: 16px;
        height: 16px;
    }

    .share-btn span {
        display: inline;
        /* Show text in sidebar */
    }

    .info-block {
        width: 100%;
        text-align: center;
    }

    .info-block h2 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .space-link {
        max-width: 200px;
        font-size: 0.8rem;
        padding: 0.6rem;
    }

    .link-container {
        margin-top: 1rem;
        gap: 10px;
    }

    .link-container .icon-btn-small {
        width: 40px;
        height: 40px;
    }

    .usage-container {
        margin-top: 1rem;
    }

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

    .timer {
        font-size: 1.5rem;
        margin: 1rem 0 0.5rem 0;
    }

    .btn-destroy {
        width: 100%;
        display: block;
        /* Show destroy button in sidebar */
        margin-top: 1rem;
    }

    /* Close button for sidebar */
    .sidebar-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 32px;
        height: 32px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid var(--glass-border);
        border-radius: 50%;
        color: var(--text-color);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

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

    .sidebar-close svg {
        width: 16px;
        height: 16px;
    }

    .main-content {
        padding: 4rem 1rem 1rem 1rem;
        /* Add top padding for toggle button */
        flex: 1;
        width: 100%;
    }

    .upload-area {
        padding: 2rem 1rem;
        margin-bottom: 1rem;
    }

    .upload-area h3 {
        font-size: 1.3rem;
    }

    .upload-area p {
        font-size: 1rem;
    }

    .upload-icon {
        font-size: 2.5rem;
    }

    .file-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .file-card {
        padding: 10px;
    }

    .file-preview {
        height: 90px;
        font-size: 1.8rem;
    }

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

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

    .download-btn-primary {
        padding: 10px;
        font-size: 0.85rem;
    }

    .delete-btn-corner {
        width: 30px;
        height: 30px;
        top: 10px;
        right: 10px;
    }

    .delete-btn-corner svg {
        width: 14px;
        height: 14px;
    }

    .toast-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        min-width: auto;
        width: 100%;
        margin-bottom: 5px;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .modal {
        width: 95%;
        padding: 1rem;
        border-radius: 15px;
    }

    .modal h3 {
        font-size: 1.1rem;
    }

    .modal p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
}

/* Extra small screens */
@media (max-width: 320px) {
    h1 {
        font-size: 1.8rem;
    }

    .sidebar {
        width: 260px;
        padding: 0.8rem;
    }

    .sidebar-toggle {
        width: 40px;
        height: 40px;
    }

    .sidebar-toggle svg {
        width: 18px;
        height: 18px;
    }

    .qr-container {
        padding: 0.8rem;
    }

    .qr-container img {
        width: 120px;
        height: 120px;
    }

    .share-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .info-block h2 {
        font-size: 1.1rem;
    }

    .space-link {
        max-width: 180px;
        font-size: 0.75rem;
        padding: 0.5rem;
    }

    .link-container .icon-btn-small {
        width: 36px;
        height: 36px;
    }

    .timer {
        font-size: 1.3rem;
    }

    .usage-text {
        font-size: 0.7rem;
    }

    .main-content {
        padding: 3.5rem 0.8rem 0.8rem 0.8rem;
    }

    .upload-area {
        padding: 1.5rem 0.8rem;
    }

    .upload-area h3 {
        font-size: 1.1rem;
    }

    .upload-area p {
        font-size: 0.9rem;
    }

    .upload-icon {
        font-size: 2rem;
    }

    .file-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.6rem;
    }

    .file-preview {
        height: 70px;
        font-size: 1.2rem;
    }

    .file-card {
        padding: 6px;
    }

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

    .file-size {
        font-size: 0.65rem;
    }

    .download-btn-primary {
        padding: 6px;
        font-size: 0.75rem;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 1rem;
        justify-content: space-around;
    }

    .qr-section {
        flex: 0 0 auto;
    }

    .qr-container img {
        width: 80px;
        height: 80px;
    }

    .info-block {
        flex: 1;
        min-width: 200px;
    }

    .timer {
        font-size: 1rem;
        margin: 0.5rem 0;
    }

    .main-content {
        padding: 1rem;
    }

    .upload-area {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .upload-area h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .upload-icon {
        font-size: 1.5rem;
        margin-bottom: 0.3rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {

    /* Increase touch targets */
    .btn-primary,
    .btn-secondary,
    .btn-destroy,
    .share-btn {
        min-height: 44px;
        padding: 0.8rem 1.5rem;
    }

    .icon-btn-small {
        min-width: 44px;
        min-height: 44px;
    }

    .delete-btn-corner {
        min-width: 32px;
        min-height: 32px;
        opacity: 1;
        transform: scale(1);
    }

    .download-btn-primary {
        min-height: 40px;
        padding: 0.8rem;
    }

    .space-link {
        min-height: 40px;
        display: flex;
        align-items: center;
        padding: 0.8rem;
    }

    /* Improve hover states for touch */
    .file-card:hover {
        transform: none;
    }

    .file-card:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .qr-container img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support for mobile browsers */
@media (prefers-color-scheme: dark) {

    /* Already using dark theme, but ensure consistency */
    .modal {
        background: #1a1a1a;
        border-color: rgba(255, 255, 255, 0.1);
    }
}