/* Global Styles */
:root {
    --primary: #4a6fff;
    --primary-dark: #3a5bdf;
    --secondary: #6c63ff;
    --success: #4ade80;
    --danger: #f87171;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #94a3b8;
    --light-gray: #e2e8f0;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f4f8;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(74, 111, 255, 0.1) 0%, rgba(108, 99, 255, 0.1) 100%);
    filter: blur(20px);
}

.shape1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
}

.shape2 {
    width: 200px;
    height: 200px;
    top: 60%;
    left: 80%;
}

.shape3 {
    width: 250px;
    height: 250px;
    top: 30%;
    left: 70%;
}

.shape4 {
    width: 180px;
    height: 180px;
    top: 80%;
    left: 15%;
}

.shape5 {
    width: 220px;
    height: 220px;
    top: 50%;
    left: 40%;
}

.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 40px;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-link {
    color: var(--dark);
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover {
    background-color: var(--light-gray);
}

.nav-link.active {
    color: var(--primary);
}

.scan-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.scan-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--dark);
    transition: var(--transition);
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero-section {
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--gray);
}

.upload-area {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 3rem;
    border: 2px dashed var(--light-gray);
    transition: var(--transition);
    cursor: pointer;
    max-width: 600px;
    margin: 0 auto;
}

.upload-area:hover {
    border-color: var(--primary);
}

.dragover {
    border-color: var(--primary) !important;
    background-color: rgba(74, 111, 255, 0.05);
}

.upload-icon {
    color: var(--primary);
    margin-bottom: 1rem;
}

.upload-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.upload-subtitle {
    color: var(--gray);
}

#browse {
    color: var(--primary);
    cursor: pointer;
}

.file-preview {
    max-width: 600px;
    margin: 2rem auto;
}

.file-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    color: var(--primary);
}

.file-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.file-size {
    color: var(--gray);
    font-size: 0.875rem;
}

.share-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.share-btn:hover {
    background-color: var(--primary-dark);
}

.qr-result {
    max-width: 600px;
    margin: 2rem auto;
}

.qr-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: 2rem;
    align-items: center;
}

.qr-code {
    width: 150px;
    height: 150px;
    background-color: white;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-info {
    flex: 1;
}

.share-code {
    margin: 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.qr-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.copy-btn, .new-file-btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    border: none;
}

.copy-btn {
    background-color: var(--primary);
    color: white;
}

.copy-btn:hover {
    background-color: var(--primary-dark);
}

.new-file-btn {
    background-color: var(--light-gray);
    color: var(--dark);
}

.new-file-btn:hover {
    background-color: #d1d5db;
}

.section {
    padding: 4rem 0;
}

.section-container {
    max-width: 800px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.section-text {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.faq-item {
    margin-bottom: 2rem;
    background-color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.faq-item h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
}

.modal.show {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--border-radius);
    max-width: 500px;
    margin: 100px auto;
    padding: 2rem;
    box-shadow: var(--shadow);
    z-index: 1001;
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

.modal-close:hover {
    color: var(--dark);
}

.scan-container {
    margin-bottom: 1.5rem;
    text-align: center;
}

.scan-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
}

.scan-btn:hover {
    background-color: var(--primary-dark);
}

.input-group {
    display: flex;
    gap: 1rem;
}

#codeInput {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.receive-btn {
    background-color: var(--success);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.receive-btn:hover {
    background-color: #22c55e;
}

.received-file {
    text-align: center;
    padding: 1rem;
}

.file-icon {
    color: var(--primary);
    margin-bottom: 1rem;
}

.progress-container {
    width: 100%;
    margin: 2rem 0;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: var(--light-gray);
    border-radius: 5px;
    overflow: hidden;
}

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

.progress-status {
    margin-top: 0.5rem;
    color: var(--gray);
    font-size: 0.875rem;
}

.download-btn {
    background-color: var(--success);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.download-btn:hover {
    background-color: #22c55e;
}

.footer {
    text-align: center;
    padding: 2rem;
    color: var(--gray);
    margin-top: 2rem;
}

.heart {
    color: var(--danger);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        margin: 0.5rem 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .qr-card {
        flex-direction: column;
    }

    .modal-content {
        width: 90%;
        margin: 50px auto;
    }

    .input-group {
        flex-direction: column;
    }
}

/* QR Scanner Animation */
#qr-video-container {
    width: 100%;
    max-width: 400px; /* Or any size you prefer */
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    border: 3px solid var(--primary);
    box-shadow: 0 0 15px rgba(74, 111, 255, 0.5);
}

#qr-video-container::before,
#qr-video-container::after {
    content: '';
    position: absolute;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-style: solid;
    border-color: var(--primary);
}

#qr-video-container::before {
    top: 10px;
    left: 10px;
    border-width: 5px 0 0 5px;
}

#qr-video-container::after {
    top: 10px;
    right: 10px;
    border-width: 5px 5px 0 0;
}

#qr-video-container > div::before,
#qr-video-container > div::after {
    content: '';
    position: absolute;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-style: solid;
    border-color: var(--primary);
}

#qr-video-container > div::before {
    bottom: 10px;
    left: 10px;
    border-width: 0 0 5px 5px;
}

#qr-video-container > div::after {
    bottom: 10px;
    right: 10px;
    border-width: 0 5px 5px 0;
}

#video {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
    animation: scan-line-animation 3s linear infinite;
    border-radius: 2px;
    z-index: 1;
}

@keyframes scan-line-animation {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(calc(100% - 3px));
    }
}