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

:root {
    --bg: #0a0a0a;
    --surface: #141414;
    --border: #2a2a2a;
    --text: #e0e0e0;
    --text-muted: #888;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --success: #22c55e;
    --error: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.tagline {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* Buttons */
.btn {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn:hover {
    background: var(--border);
}

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

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

.btn.secondary {
    background: transparent;
}

/* Landing */
.actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.actions .btn.primary {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.separator {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.join-form {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.join-form input {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1.2rem;
    color: var(--text);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.join-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.join-form input::placeholder {
    text-transform: none;
    letter-spacing: normal;
    color: var(--text-muted);
}

/* Waiting */
.code-display {
    text-align: center;
    margin-bottom: 2rem;
}

.code {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    margin: 1rem 0;
    color: var(--primary);
}

.hint {
    color: var(--text-muted);
    font-size: 0.9rem;
}

#waiting .btn {
    width: 100%;
}

/* Connected */
.status-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.connected {
    background: var(--success);
}

/* Dropzone */
.dropzone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.2s ease;
}

.dropzone.dragover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.dropzone-content p {
    margin-bottom: 0.5rem;
}

.dropzone-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

/* Transfer List */
.transfer-list {
    margin-top: 1.5rem;
}

.transfer-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.transfer-item .name {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.transfer-item .meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.transfer-item .progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.transfer-item .progress-bar .fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.1s ease;
}

.transfer-item.complete .progress-bar .fill {
    background: var(--success);
}

.transfer-item.error .progress-bar .fill {
    background: var(--error);
}

/* Disconnected */
#disconnected {
    text-align: center;
}

#disconnected p {
    margin-bottom: 1.5rem;
    color: var(--error);
}

#disconnected .btn {
    width: 100%;
    margin-bottom: 0.5rem;
}
