* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.install-prompt {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 15px;
    color: white;
}

.install-prompt.show {
    display: flex;
}

.install-btn {
    background: white;
    color: #4F46E5;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4F46E5;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: #4F46E5;
}

.color-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.color-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="color"] {
    width: 60px;
    height: 40px;
    border: none;
    cursor: pointer;
}

.btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

#qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 256px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 20px;
}

#qrcode canvas {
    border-radius: 8px;
}

.actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-secondary {
    background: #6b7280;
}

.history {
    margin-top: 20px;
}

.history h3 {
    margin-bottom: 15px;
    color: #4F46E5;
}

.history-item {
    background: #f9fafb;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.history-item:hover {
    background: #e5e7eb;
}

.history-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 10px;
}

.history-time {
    font-size: 12px;
    color: #6b7280;
}

.status {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: none;
}

.status.show {
    display: block;
}

.status.success {
    background: #d1fae5;
    color: #065f46;
}

.status.offline {
    background: #fee2e2;
    color: #991b1b;
}

.status.online {
    background: #dbeafe;
    color: #1e40af;
}

@media (max-width: 600px) {
    .actions {
        grid-template-columns: 1fr;
    }
    .color-group {
        grid-template-columns: 1fr;
    }
}