:root {
    --primary: #00f2fe;
    --secondary: #4facfe;
    --accent: #f0abfc;
    --bg-dark: #020617;
    --card-bg: rgba(15, 23, 42, 0.6);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glow: rgba(0, 242, 254, 0.3);
}

.hidden {
    display: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Premium Dynamic Background */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, #0f172a 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, #1e1b4b 0%, transparent 40%),
                radial-gradient(circle at 50% 50%, #020617 0%, #000000 100%);
    z-index: -2;
}

/* Chat Bubbles */
.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    position: relative;
    line-height: 1.4;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message.sent {
    align-self: flex-end;
    background: var(--primary);
    color: #020617;
    border-bottom-right-radius: 4px;
}

.message.received {
    align-self: flex-start;
    background: #1e293b;
    color: white;
    border-bottom-left-radius: 4px;
}

.message .msg-time {
    font-size: 10px;
    opacity: 0.6;
    align-self: flex-end;
}

.message img {
    max-width: 100%;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.message img:hover {
    transform: scale(1.02);
}

/* Modal */
.modal {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.visible {
    display: flex;
    opacity: 1;
}

/* Responsive Fixes */
@media (max-width: 768px) {
}

.background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.05;
    z-index: -1;
}

.bg-orb {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.3;
    animation: moveOrb 20s infinite alternate;
}

.orb-1 {
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.orb-2 {
    background: var(--accent);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes moveOrb {
    from { transform: translate(0, 0); }
    to { transform: translate(100px, 100px); }
}

.app-container {
    width: 100%;
    max-width: 1000px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

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

.menu-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-btn:hover {
    background: var(--primary);
    color: var(--bg-dark);
    transform: rotate(90deg);
}

/* Side Drawer */
.side-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100%;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2.5rem;
    border-right: 1px solid var(--glass-border);
}

.side-drawer.open {
    left: 0;
}

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

.drawer-header h2 {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 3px;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 32px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: white;
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-dim);
    text-decoration: none;
    padding: 14px 20px;
    border-radius: 16px;
    transition: all 0.3s;
    font-weight: 500;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-color: var(--glass-border);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.1), rgba(79, 172, 254, 0.1));
    color: var(--primary);
    border-color: rgba(0, 242, 254, 0.3);
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    display: none;
    backdrop-filter: blur(4px);
    animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.drawer-overlay.visible {
    display: block;
}

.app-logo {
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(0, 242, 254, 0.4));
}

.status-indicator {
    padding: 0.6rem 1.2rem;
    background: rgba(0, 242, 254, 0.05);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    border: 1px solid rgba(0, 242, 254, 0.2);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 3.5rem;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--secondary), var(--primary));
    opacity: 0.7;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

p {
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.input-group {
    display: flex;
    gap: 1rem;
    max-width: 550px;
    margin: 0 auto;
}

input {
    flex: 1;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.2rem;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

input:focus {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 1);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.1);
}

.primary-btn {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #020617;
    border: none;
    border-radius: 16px;
    padding: 0 2.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1rem;
}

.primary-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 242, 254, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.feature-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.feature-item .icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: white;
}

.feature-item p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* Step Cards */
.how-to-steps {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.step-card {
    flex: 1;
    background: rgba(0, 242, 254, 0.03);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid rgba(0, 242, 254, 0.1);
    position: relative;
}

.step-num {
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--primary);
    color: var(--bg-dark);
    width: 35px;
    height: 35px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    box-shadow: 0 5px 15px rgba(0, 242, 254, 0.3);
}

/* Dashboard UI */
.code-display {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 12px;
    margin: 2rem 0;
    color: var(--primary);
    background: rgba(0,0,0,0.4);
    padding: 1.5rem;
    border-radius: 20px;
    text-shadow: 0 0 20px rgba(0, 242, 254, 0.5);
    border: 1px solid rgba(0, 242, 254, 0.1);
}

.room-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: rgba(255,255,255,0.02);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.peers-indicator {
    background: rgba(255, 183, 77, 0.1);
    color: #ffb74d;
    padding: 10px 20px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.peers-indicator.online {
    background: rgba(105, 240, 174, 0.1);
    color: #69f0ae;
}

/* Send Options */
.send-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.drop-zone {
    background: rgba(255,255,255,0.02);
    border: 2px dashed var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.drop-zone:hover {
    border-color: var(--primary);
    background: rgba(0, 242, 254, 0.05);
    transform: scale(1.02);
}

.drop-zone .icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.drop-zone p {
    font-weight: 600;
    color: white;
    margin-bottom: 0;
}

/* Received List */
.received-files-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 1.5rem;
}

.received-file-item {
    background: rgba(15, 23, 42, 0.6);
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: 0.3s;
}

.received-file-item:hover {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
}

.download-btn {
    background: var(--primary);
    color: var(--bg-dark);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s;
}

.download-btn:hover {
    background: white;
    transform: translateY(-2px);
}

/* Progress */
#progress-container {
    margin-top: 3rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
}

.progress-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 1rem;
}

#progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--secondary), var(--primary));
    box-shadow: 0 0 15px var(--glow);
}

/* Support Screens */
.support-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.support-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
}

.support-item strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

footer {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.95rem;
    padding: 2rem 0;
    border-top: 1px solid var(--glass-border);
}

@media (max-width: 768px) {
    .feature-grid, .how-to-steps, .support-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
    
    .card {
        padding: 2rem 1.5rem;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .primary-btn {
        padding: 1.2rem;
    }
}
