* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    min-height: 100vh;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Check-in Container */
.checkin-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Header */
.checkin-header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease;
}

.checkin-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.checkin-header .subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 20px;
}

.printer-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e74c3c;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: #27ae60;
    box-shadow: 0 0 10px rgba(39, 174, 96, 0.5);
}

/* Main Card */
.checkin-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease;
}

.checkin-card h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 30px;
    text-align: center;
}

/* Input Group */
.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #2c5282;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.input-box {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    background: #f7fafc;
}

.input-box:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Member Status Display */
.member-status-display {
    margin-bottom: 20px;
    text-align: center;
    animation: slideDown 0.3s ease;
}

.member-status-display.hidden {
    display: none;
}

.status-badge {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.member-title {
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.status-badge.organizer {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.status-badge.cornerstone {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.status-badge.pinnacle {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.status-badge.vip {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.status-badge.member {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.status-badge.guest {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.status-badge.registered {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Quick Select with Search */
.quick-select {
    margin-bottom: 25px;
}

.search-header {
    margin-bottom: 15px;
}

.quick-select-label {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 10px;
    text-align: center;
}

.search-box {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    background: #f7fafc;
}

.search-box:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Member Category Tabs */
.member-tabs {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 4px;
}

.member-tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px 8px 0 0;
    font-family: 'Montserrat', sans-serif;
}

.member-tab-btn:hover {
    background: #f1f5f9;
    color: #1e3a5f;
}

.member-tab-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.name-list {
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    padding: 8px;
}

.name-list::-webkit-scrollbar {
    width: 8px;
}

.name-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.name-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.name-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.name-item {
    padding: 12px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.name-item:hover {
    background: #eff6ff;
    transform: translateX(4px);
}

.name-item.selected {
    background: #3b82f6;
    color: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.name-item-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.name-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nick-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
}

.nick-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.nick-btn:active {
    transform: scale(0.95);
}

.name-item.selected .nick-btn {
    background: white;
    color: #10b981;
}

.name-item-status {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.name-item:not(.selected) .name-item-status.organizer {
    background: #fef3c7;
    color: #92400e;
}

.name-item:not(.selected) .name-item-status.cornerstone {
    background: #ede9fe;
    color: #5b21b6;
}

.name-item:not(.selected) .name-item-status.pinnacle {
    background: #fee2e2;
    color: #991b1b;
}

.name-item:not(.selected) .name-item-status.vip {
    background: #fce7f3;
    color: #9f1239;
}

.name-item:not(.selected) .name-item-status.member {
    background: #d1fae5;
    color: #065f46;
}

.name-item:not(.selected) .name-item-status.guest {
    background: #f1f5f9;
    color: #334155;
}

.name-item:not(.selected) .name-item-status.luma {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.name-item.selected .name-item-status {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Visit Count Buttons */
.visit-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.visit-btn {
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c5282;
    cursor: pointer;
    transition: all 0.3s ease;
}

.visit-btn:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.visit-btn.selected {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* Register Section */
.register-section {
    text-align: center;
    margin-bottom: 25px;
}

.link-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.link-btn:hover {
    color: #2563eb;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.btn {
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-primary:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: white;
    color: #2c5282;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: translateY(-2px);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    color: white;
    animation: successPop 0.5s ease;
}

.success-message.hidden {
    display: none;
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.success-text {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-content.success-modal {
    max-width: 450px;
    text-align: center;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3a5f;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close-btn:hover {
    color: #64748b;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Delete Modal Specific Styles */
.delete-modal .modal-body {
    min-height: 200px;
}

.delete-step {
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.delete-step.hidden {
    display: none;
}

.delete-warning {
    font-size: 1.3rem;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 15px;
}

.delete-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 20px;
}

.delete-success {
    font-size: 1.3rem;
    font-weight: 700;
    color: #059669;
    margin: 40px 0;
}

.verification-code {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    border: 2px solid #f59e0b;
}

.code-display {
    font-size: 2rem;
    font-weight: 700;
    color: #92400e;
    letter-spacing: 8px;
    font-family: 'Courier New', monospace;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 10px;
}

/* Hamburger Menu */
.hamburger-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 8px;
    transition: all 0.3s ease;
    z-index: 999;
}

.hamburger-menu span {
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
    transition: right 0.4s ease;
    z-index: 1001;
    overflow-y: auto;
}

.settings-panel.active {
    right: 0;
}

.settings-panel.hidden {
    display: block;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: white;
}

.settings-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.settings-header .close-btn {
    color: white;
}

.settings-content {
    padding: 25px;
}

.settings-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.clickable-stat {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    padding: 10px;
}

.clickable-stat:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.clickable-stat.active {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.settings-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.tab-btn:hover {
    color: #1e3a5f;
    background: rgba(59, 130, 246, 0.05);
}

.tab-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 15px;
}

.recent-checkins h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 15px;
}

.checkin-list {
    max-height: 400px;
    overflow-y: auto;
}

.checkin-item {
    padding: 12px;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 4px solid #3b82f6;
}

.checkin-item.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkin-item.clickable:hover {
    background: #e0f2fe;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.checkin-item-name {
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 4px;
}

.checkin-item-time {
    font-size: 0.85rem;
    color: #64748b;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes successPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .checkin-header h1 {
        font-size: 2rem;
    }

    .checkin-card {
        padding: 30px 20px;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .name-buttons {
        grid-template-columns: 1fr;
    }

    .admin-panel {
        width: 100%;
        right: -100%;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #2c3e50;
}

header p {
    color: #666;
    font-size: 1.1em;
}

.status-panel {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.online {
    background: #27ae60;
    box-shadow: 0 0 10px rgba(39, 174, 96, 0.5);
}

.status-indicator.offline {
    background: #e74c3c;
}

.printer-info {
    color: #666;
    font-size: 0.9em;
}

.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.tab-button.active {
    background: #3498db;
    color: white;
}

.tab-button:hover:not(.active) {
    background: rgba(52, 152, 219, 0.1);
}

.tab-content {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.tab-content.active {
    display: block;
}

.section {
    margin-bottom: 30px;
}

.section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.section h3 {
    margin-bottom: 15px;
    color: #34495e;
}

.connection-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.method-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.method-card:hover {
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.method-card h3 {
    color: #3498db;
    margin-bottom: 10px;
}

.method-card p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn.primary {
    background: #3498db;
    color: white;
}

.btn.primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn.secondary {
    background: #95a5a6;
    color: white;
}

.btn.secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.command-input {
    margin-bottom: 15px;
}

.command-input label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.command-input input,
.command-input select,
.command-input textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.command-input input:focus,
.command-input select:focus,
.command-input textarea:focus {
    outline: none;
    border-color: #3498db;
}

.command-buttons {
    margin-bottom: 20px;
}

.preset-commands {
    margin-top: 30px;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.preset-btn {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.test-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.test-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.test-section input,
.test-section select {
    margin-right: 10px;
    margin-bottom: 10px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.diagnostic-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.log-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.log-output {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 10px;
    height: 400px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.4;
}

.log-entry {
    margin-bottom: 8px;
    display: flex;
    gap: 10px;
}

.log-entry.info .timestamp {
    color: #3498db;
}

.log-entry.success .timestamp {
    color: #27ae60;
}

.log-entry.error .timestamp {
    color: #e74c3c;
}

.log-entry.warning .timestamp {
    color: #f39c12;
}

.timestamp {
    font-weight: 600;
    min-width: 120px;
}

.message {
    flex: 1;
}

.serial-options,
.bluetooth-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.bluetooth-info small {
    color: #666;
    font-style: italic;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.8);
}

footer p {
    margin: 5px 0;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .tabs {
        flex-direction: column;
    }

    .connection-methods {
        grid-template-columns: 1fr;
    }

    .diagnostic-buttons {
        flex-direction: column;
    }

    .preset-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content.active {
    animation: fadeIn 0.3s ease-in;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Test button grid styles */
.test-group {
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.test-group h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.2em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.button-grid .btn {
    margin: 0;
    padding: 12px 15px;
    font-size: 0.95em;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Custom Text Section Styles */
.custom-text-section {
    background: rgba(46, 204, 113, 0.1);
    border: 2px solid #2ecc71;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.custom-text-section h3 {
    color: #27ae60;
    font-size: 1.4em;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #2ecc71;
    padding-bottom: 10px;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.control-group {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.control-group label {
    display: block;
    font-weight: 600;
    color: #27ae60;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.control-group input,
.control-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e8f5e8;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.control-group input:focus,
.control-group select:focus {
    outline: none;
    border-color: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.text-input-area {
    grid-column: 1 / -1;
}

.text-input-area textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px 15px;
    border: 2px solid #e8f5e8;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

.text-input-area textarea:focus {
    outline: none;
    border-color: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.label-preview {
    background: white;
    border: 2px dashed #2ecc71;
    border-radius: 8px;
    padding: 8px;
    margin: 12px 0;
    text-align: center;
    /* Visual label size: 3in x 2in */
    width: 3in;
    height: 2in;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.label-preview h4 {
    color: #27ae60;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.preview-content {
    color: #666;
    font-style: italic;
    cursor: text;
    /* indicate editable */
    user-select: text;
}

/* When editing inline, keep the same visual style but show a clear editable outline */
.preview-content[contenteditable="true"] {
    /* Gentle focus styling while editing, no large dashed border */
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.08) inset;
    padding: 4px 6px;
    border-radius: 4px;
    caret-color: #2ecc71;
    font-style: normal;
}

.control-group input[type="range"] {
    width: 160px;
}

#textSizeValue {
    font-weight: 700;
    color: #27ae60;
}

.print-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.print-actions .btn {
    min-width: 150px;
    font-size: 1.1em;
    padding: 15px 25px;
}

.print-actions .btn.primary {
    background: #27ae60;
    font-size: 1.2em;
    font-weight: 700;
}

.print-actions .btn.primary:hover {
    background: #229954;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4);
}