body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

h1, h2, h3 {
    text-align: center;
    margin-bottom: 20px;
}

.card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

button {
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

button:hover {
    background: #0056b3;
}

button#disconnect-btn, button#leave-btn {
    background: #dc3545;
}

.hidden {
    display: none !important;
}

/* Room Lobby */
.room-info {
    text-align: center;
}

.code-display {
    font-size: 32px;
    font-family: monospace;
    letter-spacing: 5px;
    margin: 20px 0;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#qr-code {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* Transfer Area */
.input-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .input-controls {
        grid-template-columns: 1fr;
    }
}

.drop-zone {
    border: 2px dashed #007bff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    background: #f0f8ff;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#text-input {
    height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: none;
    font-family: inherit;
}

.file-item {
    background: white;
    border: 1px solid #eee;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 4px;
    cursor: pointer;
    object-fit: cover;
    border: 1px solid #ddd;
}

.text-content {
    background: #f1f1f1;
    padding: 10px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 14px;
}

.action-row {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-small {
    padding: 5px 12px;
    font-size: 13px;
    border-radius: 4px;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 80%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 4px;
    cursor: default;
}

.modal-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.modal-hint {
    color: #ccc;
    font-size: 14px;
    background: rgba(0,0,0,0.5);
    padding: 5px 15px;
    border-radius: 20px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.file-progress {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #28a745;
    width: 0%;
    transition: width 0.2s;
}

.status {
    font-size: 14px;
    color: #666;
}

.status.connected {
    color: #28a745;
    font-weight: bold;
}
