/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* Make sure the HTML and body take full height */
html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1 {
    text-align: center;
    margin: 1rem 0;
    color: #2c3e50;
    font-size: 1.8rem;
}

.connection-section, .transfer-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.id-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 0.5rem;
}

.button-group {
    display: flex;
    gap: 5px;
}

.button-group {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.button-group button {
    padding: 0.6rem 1rem;
    min-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    line-height: 1.2;
    border-radius: 4px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

#peer-id {
    flex: 1;
    min-width: 0; /* Prevents input from overflowing */
    margin: 0;
    padding: 0.6rem;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
}

#qrcode-container {
    text-align: center;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    display: none;
}

#qrcode-container.visible {
    display: block;
}

#qrcode {
    display: inline-block;
    padding: 10px;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

#qrcode img {
    max-width: 100%;
    height: auto;
}

.hidden {
    display: none !important;
}

label {
    font-weight: 600;
    min-width: 100px;
}

input[type="text"] {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

#copy-id {
    background-color: #2ecc71;
}

#copy-id:hover {
    background-color: #27ae60;
}

.file-drop {
    border: 2px dashed #3498db;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.file-drop:hover {
    background-color: #f0f8ff;
}

#file-list {
    margin-top: 1rem;
    text-align: left;
}

.file-item {
    padding: 0.5rem;
    background: #f8f9fa;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status {
    margin-top: 1.5rem;
}

#status-messages {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.9rem;
}

.status-message {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.status-message:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: #2ecc71;
    width: 0%;
    transition: width 0.3s;
}
