/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

:root {
    --primary-red: #a31f2a;
    --primary-red-hover: #b92b37;
    --background-dark: #1E1A1A;
    /* Dark brownish tint from image */
    --background-black: #120F0F;
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
    --card-bg: #252222;
    --border-color: #333;
}

body {
    background-color: var(--background-black);
    color: var(--text-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    /* For pseudo-element absolute positioning */
}

body::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(163, 31, 42, 0.15) 0%, rgba(18, 15, 15, 0) 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-top: 80px;
    /* Space for fixed header */
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    flex-wrap: wrap;
    gap: 16px;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1448px;
    /* Match container width + padding approx */
    z-index: 1000;
    background: rgba(18, 15, 15, 0.7);
    /* Mirror/Glass effect */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0 0 16px 16px;
    /* Optional: Slight curve at bottom corners for premium feel, or kep straight */
    /* Let's keep it straight or match design language. Design doesn't show fixed, but user asked. */
    border-radius: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background-color: var(--primary-red);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.logo-icon svg {
    width: 20px;
    height: 20px;
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-white);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.btn-text {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary-red);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-red-hover);
}

/* Main Content */
#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    /* To ensure stacking context */
}

.view {
    display: none;
    /* height: 100%; Removed fixed height to allow scrolling on mobile */
    flex-direction: column;
    flex: 1;
}

.view.active {
    display: flex;
}

/* Landing View */
#landing-view {
    justify-content: center;
    /* Changed from space-between to center vertically if content is short, or flex-start */
    padding: 40px 0;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    /* Increased gap */
    padding: 20px 0;
    flex: 1;
    flex-wrap: wrap;
    /* Allow wrapping for responsiveness */
}

.hero-text {
    max-width: 550px;
    /* Increased slightly */
    flex: 1;
    min-width: 300px;
    padding-left: 24px;
    /* Added padding to move away from wall */
}

.badge-secure {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(163, 31, 42, 0.1);
    color: #ff4d5a;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    border: 1px solid rgba(163, 31, 42, 0.2);
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 24px;
}

.text-highlight {
    color: var(--primary-red);
}

.hero-description {
    color: var(--text-gray);
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 480px;
}

.social-proof {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    /* Added spacing for mobile stack */
}

.avatars {
    display: flex;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--background-black);
    margin-right: -10px;
}

.proof-text {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-left: 12px;
}

.stats-container {
    margin-top: 20px; 
    padding: 15px; 
    background: rgba(255,255,255,0.05); 
    border-radius: 8px; 
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Upload Card & Dashed Border Fix */
.hero-card {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 24px;
    /* Space for the dashed border */
    margin: 20px auto;
    /* Centering fix */
    border: 2px dashed rgba(255, 255, 255, 0.15);
    /* The outer dashed border */
    border-radius: 24px;
    /* Larger radius for the container */
    background-color: transparent;
    /* Container is transparent */
    max-width: 460px;
    width: 100%;
}

.upload-card {
    width: 100%;
    background-color: var(--card-bg);
    border-radius: 16px;
    /* Inner card radius */
    padding: 40px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    /* Strong shadow */
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle inner border */
}

.upload-icon-circle {
    width: 64px;
    height: 64px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.upload-card h2 {
    font-size: 1.35rem;
    /* Slightly larger */
    margin-bottom: 8px;
    font-weight: 700;
}

.upload-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 32px;
    line-height: 1.5;
}

.upload-card strong {
    color: white;
}

.file-types {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    justify-content: center;
}

.type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.type:hover {
    opacity: 0.8;
}

.type .icon {
    font-size: 1.2rem;
}

.type .label {
    font-size: 0.7rem;
    font-weight: 600;
}

.btn-large-primary {
    width: 100%;
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    transition: background 0.2s;
}

.btn-large-primary:hover {
    background-color: var(--primary-red-hover);
}

.btn-large-secondary {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
    transition: background 0.2s;
}

.btn-large-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.card-footer {
    font-size: 0.7rem;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.7;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Footer */
.landing-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-gray);
    font-size: 0.85rem;
    flex-wrap: wrap;
    /* Footer Wrap */
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.security-badges {
    display: flex;
    gap: 24px;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Uploading View Styles */
.centered-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    /* Reduced from 80vh for flexibility */
    padding: 40px 0;
    width: 100%;
}

.upload-header {
    width: 100%;
    max-width: 500px;
    margin-bottom: 24px;
    text-align: left;
}

.upload-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.upload-header p {
    color: var(--text-gray);
    font-size: 1rem;
}

.main-upload-card {
    width: 100%;
    max-width: 500px;
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
}

.upload-banner {
    background: linear-gradient(135deg, #a31f2a 0%, #7e161f 100%);
    padding: 32px 24px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.upload-banner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.5 19C19.9853 19 22 16.9853 22 14.5C22 12.132 20.177 10.244 17.8 10.05C17.5 6.9 14.9 4.5 11.8 4.7C8.9 4.9 6.6 7.1 6.3 10C3.7 10.4 2 12.6 2 15.3C2 18.1 4.2 20.3 7 20.3L17.5 19Z' fill='white' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.1;
    pointer-events: none;
}

.upload-banner h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    position: relative;
    z-index: 2;
}

.upload-banner p {
    font-size: 0.8rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.upload-body {
    padding: 24px;
}

.overall-progress {
    margin-bottom: 32px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.95rem;
}

.progress-subtext {
    color: var(--text-gray);
    font-size: 0.8rem;
    margin-bottom: 12px;
}

.progress-bar-container {
    height: 6px;
    background-color: #333;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 100%;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-red);
    border-radius: 3px;
}

.section-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 16px;
    font-weight: 600;
}

.file-list-section {
    margin-bottom: 32px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.file-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.file-icon.red-icon {
    background-color: rgba(163, 31, 42, 0.2);
    color: #ff4d5a;
}

.file-icon.gray-icon {
    background-color: rgba(255, 255, 255, 0.1);
    color: #aaa;
}

.file-details {
    flex: 1;
    min-width: 0;
    /* Text truncation fix */
}

.file-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.status-check {
    color: #4CAF50;
    /* Green check */
    background-color: rgba(76, 175, 80, 0.2);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.status-clock {
    color: #999;
    font-size: 1rem;
}

.config-section {
    margin-bottom: 24px;
}

.config-tabs {
    display: flex;
    background-color: #1a1a1a;
    padding: 4px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.config-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-gray);
    padding: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 500;
}

.config-tab.active {
    background-color: #333;
    color: white;
}

.dark-input {
    width: 100%;
    background-color: #1a1a1a;
    border: 1px solid #333;
    padding: 12px 16px;
    border-radius: 6px;
    color: white;
    font-size: 0.95rem;
}

.input-help {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-top: 8px;
}

.action-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}

.btn-text-only {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-text-only:hover {
    color: white;
}

.btn-primary-wide {
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    flex: 1;
    margin-left: 24px;
    transition: background 0.2s;
}

.btn-primary-wide:hover {
    background-color: var(--primary-red-hover);
}

.security-footer {
    margin-top: 32px;
    display: flex;
    gap: 24px;
    color: var(--text-gray);
    font-size: 0.75rem;
    opacity: 0.8;
}

.security-footer span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Success View Styles */

.success-icon-container {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.success-icon {
    width: 64px;
    height: 64px;
    background-color: rgba(163, 31, 42, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-red);
    box-shadow: 0 0 20px rgba(163, 31, 42, 0.2);
    border: 2px solid rgba(163, 31, 42, 0.1);
}

.success-header {
    text-align: center;
    margin-bottom: 40px;
}

.success-header h1 {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.success-header p {
    color: var(--text-gray);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

.success-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 500px;
    margin-bottom: 40px;
}

.file-preview-card {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 32px;
}

.file-icon-large {
    width: 48px;
    height: 48px;
    background-color: rgba(163, 31, 42, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
}

.file-content {
    flex: 1;
    min-width: 0;
}

.file-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-status {
    width: 36px;
    height: 36px;
    position: relative;
}

.circular-progress {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.circular-progress .progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--text-gray);
}

.circular-progress svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.circular-progress .circle-bg,
.circular-progress .circle {
    fill: none;
    stroke-width: 3;
}

.circular-progress .circle-bg {
    stroke: rgba(255, 255, 255, 0.1);
}

.circular-progress .circle {
    stroke: var(--primary-red);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}

.file-item.completed .circular-progress {
    display: none;
}

.file-item.completed .status-check {
    display: flex;
}

.file-content .file-meta {
    font-size: 0.85rem;
    color: var(--text-gray);
}

.link-generation-section label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: white;
}

.link-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    width: 100%;
}

.link-display {
    flex: 1;
    background-color: #121212;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 12px 16px;
    font-family: monospace;
    color: white;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    /* prevents flex overflow */
}

.link-display .link-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.link-icon-small {
    opacity: 0.5;
}

.btn-copy {
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 0 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-copy:hover {
    background-color: var(--primary-red-hover);
}

.share-options {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
}

.share-label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-gray);
    margin-bottom: 16px;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.share-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-back {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 12px;
}

.footer-note {
    color: var(--text-gray);
    font-size: 0.85rem;
    opacity: 0.6;
}

/* RESPONSIVE STYLES */
@media (max-width: 1024px) {
    h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .logo {
        justify-content: center;
    }

    .nav-links {
        display: none;
        /* Hide nav links on mobile effectively or use hamburger menu if full impl needed, typically just Stack */
    }

    .nav-actions {
        justify-content: center;
    }

    /* Stack Hero Content */
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    h1 {
        font-size: 2.5rem;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .social-proof {
        justify-content: center;
    }

    .hero-card {
        width: 100%;
        margin-top: 40px;
    }

    .landing-footer {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .footer-links {
        flex-direction: column;
        gap: 16px;
    }

    .security-badges {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    /* Upload / Success Views on Mobile */
    .upload-header {
        text-align: center;
    }

    .action-footer {
        flex-direction: column-reverse;
        gap: 20px;
    }

    .btn-primary-wide {
        width: 100%;
        margin-left: 0;
    }

    .link-input-group {
        flex-direction: column;
    }

    .btn-copy {
        width: 100%;
        justify-content: center;
    }
}