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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
}

/* Responsive design for small screens */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 25px 15px;
        border-radius: 15px;
    }
}

h1 {
    color: #333;
    margin-bottom: 10px;
    text-align: center;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

h1 i {
    font-size: 28px;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.version-info {
    text-align: center;
    margin-bottom: 30px;
    font-size: 11px;
    color: #999;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: block;
    min-height: 14px;
}

.version-info:hover {
    opacity: 1;
}

.version-info:empty {
    display: none;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 1s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

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

button {
    /* flex: 1; */
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

button i {
    font-size: 14px;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-send {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-send:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-clear {
    background: #f5f5f5;
    color: #333;
}

.btn-clear:hover:not(:disabled) {
    background: #e0e0e0;
}

.status {
    margin-top: 20px;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.status.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideIn 1s ease-out;
}

.status.hide {
    opacity: 0;
    transform: translateY(-10px);
    animation: slideOut 1s ease-out;
}

.status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.room-id {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
}

.room-id-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.room-id-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    word-break: break-all;
}

.copy-btn {
    margin-top: 10px;
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.copy-btn:hover {
    background: #5568d3;
}

.qr-code-container {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    display: none;
}

.qr-code-container.show {
    display: block;
}

.qr-code-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

#qrcode {
    padding: 10px;
    background: white;
    border-radius: 8px;
}

.qr-toggle-btn {
    margin-top: 10px;
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.qr-toggle-btn:hover {
    background: #218838;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.url-list {
    margin-top: 20px;
}

.url-list-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.url-item {
    padding: 12px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.url-item:hover {
    background: #e9ecef;
}

.url-item.pinned {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
}

.url-item.pinned:hover {
    background: #ffe69c;
}

.url-item-content {
    cursor: pointer;
    min-width: 0;
    flex: 1;
}

.url-item-preview {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.url-item-favicon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    flex-shrink: 0;
    object-fit: cover;
    background: #f0f0f0;
}

.url-item-info {
    flex: 1;
    min-width: 0;
}

.url-item-title {
    font-size: 15px;
    color: #333;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.url-item-url {
    font-size: 13px;
    color: #667eea;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    font-weight: 400;
}

.url-item-domain {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.url-item-time {
    font-size: 11px;
    color: #999;
}

.url-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
}

.url-item-pin {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.url-item-pin i {
    font-size: 14px;
}

.url-item-pin:hover {
    background: #e9ecef;
    transform: scale(1.1);
}

.url-item-pin.pinned {
    background: #ffc107;
    border-color: #ffc107;
    color: #333;
}

.url-item-pin.pinned:hover {
    background: #ffca2c;
}

.url-item-delete {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.url-item-delete i {
    font-size: 14px;
}

.url-item-delete:hover {
    background: #c82333;
    transform: scale(1.1);
}

.url-item-delete:active {
    transform: scale(0.9);
}

.url-list-empty {
    text-align: center;
    color: #999;
    padding: 20px;
    font-size: 14px;
}

/* Accessibility improvements */
button:focus,
input:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading state */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

