:root {
    --bg-color: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #3b82f6, #8b5cf6);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #ec4899, #f43f5e);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

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

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

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

h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#device-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-indicator.waiting {
    background-color: #f59e0b;
    box-shadow: 0 0 10px #f59e0b;
}

.status-indicator.connected {
    background-color: var(--success);
    box-shadow: 0 0 10px var(--success);
}

main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.qr-section h2 {
    margin-bottom: 0.5rem;
}

.qr-section p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.qr-container {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

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

.ip-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.ip-info a {
    color: var(--accent);
    text-decoration: none;
}

.files-section {
    display: flex;
    flex-direction: column;
}

.files-section h2 {
    margin-bottom: 1rem;
}

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

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
}

.drop-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.drop-subtext {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.list-header {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.file-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    cursor: grab;
    transition: transform 0.2s, background 0.2s;
}

.file-item:active {
    cursor: grabbing;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.file-item.sortable-ghost {
    opacity: 0.4;
}

.file-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.file-name {
    flex-grow: 1;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delete-btn {
    background: transparent;
    border: none;
    color: var(--danger);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
}

.delete-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.drag-handle {
    color: var(--text-secondary);
    cursor: grab;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
    }
}
