/* Responsive Design */
@media (max-width: 768px) {
    .card-container {
        justify-content: center;
    }
    
    .card {
        width: calc(50% - 60px);
    }
    
    .info-section-title {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .info-section-title button {
        margin-top: 10px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .profile-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .profile-item .delete-btn {
        margin-top: 15px;
        align-self: flex-end;
    }
    
    .button-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .card {
        width: 100%;
    }
    
    body {
        padding: 10px;
    }
    
    .container {
        padding: 10px;
    }
    
    .value-tag {
        width: 100%;
        box-sizing: border-box;
        margin: 5px 0;
    }
    
    .profile-info {
        display: flex;
        flex-direction: column;
        margin: 8px 0;
    }
}/* Animation effects */
@keyframes glow {
    0% { text-shadow: 0 0 10px rgba(90, 132, 255, 0.5); }
    50% { text-shadow: 0 0 20px rgba(90, 132, 255, 0.8); }
    100% { text-shadow: 0 0 10px rgba(90, 132, 255, 0.5); }
}

h2 {
    animation: glow 3s infinite;
}@font-face {
    font-family: 'VT323';
    src: url('/static/fonts/VT323-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'VT323', monospace;
    background-color: #0f0f17;
    color: #c7d3e3;
    margin: 0;
    padding: 20px;
    font-size: 18px;
}

.container {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.logo {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(90, 132, 255, 0.6));
}

.back-button {
    width: fit-content;
    background-color: transparent;
    border: 2px solid #5a84ff;
    color: #5a84ff;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 18px;
    margin-bottom: 15px;
}

.back-button:hover {
    background-color: #5a84ff;
    color: #0f0f17;
}

.header-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    margin-bottom: 30px;
}

h1, h2 {
    color: #5a84ff;
}

h1 {
    display: flex;
    justify-content: center;
    font-size: 2.5em;
    margin-bottom: 20px;
}

h2 {
    font-size: 2em;
    margin-bottom: 10px;
    border-bottom: 1px solid #323259;
    padding-bottom: 10px;
    text-shadow: 0 0 10px rgba(90, 132, 255, 0.5);
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: left;
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background-color: #1e1e2f;
    width: calc(33.333% - 60px);
    min-width: 220px;
    border-radius: 10px;
    padding: 20px;
    margin: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #323259;

    hyphens: auto;
    word-break: break-word;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #00ffb3;
    z-index: 1;
    opacity: 0.8;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    background-color: #292942;
}

.card:hover::before {
    background: #5a84ff;
}

.card h3 {
    font-size: 1.4em;
    color: #00ffb3;
    margin: 0;
    margin-left: 10px;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.card:hover h3 {
    color: #5a84ff;
}

.card p {
    margin: 10px 0;
    font-size: 1.1em;
    color: #a3b5cf;
}

.card a {
    text-decoration: none;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: pointer;
}

.card a:hover {
    background-color: rgba(90, 132, 255, 0.05);
}

/* IP Display */
p {
    font-size: 1.2em;
    color: #f7cf4c;
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
}

/* ===== footer ===== */

.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #323259;
}

.disclaimer {
    background-color: rgba(255, 58, 76, 0.1);
    border-left: 3px solid #ff3a4c;
    padding: 15px;
    margin-top: 20px;
}

.disclaimer h3 {
    color: #ff3a4c;
    margin-top: 0;
    margin-bottom: 10px;
}

.disclaimer p {
    font-size: 18px;
    margin: 5px 0;
    text-align: left;
    color: #c7d3e3;
}

/* 字典生成器頁面樣式 */
.form-group {
    margin-bottom: 20px;
    border-left: 3px solid #5a84ff;
    padding-left: 15px;
}

.info-section {
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #323259;
}

.info-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.info-values {
    margin-left: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #5a84ff;
    font-size: 1.2em;
}

input, select {
    width: 100%;
    padding: 10px;
    background-color: #1e1e2f;
    border: 1px solid #323259;
    color: #c7d3e3;
    font-family: 'VT323', monospace;
    font-size: 18px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    border-color: #5a84ff;
    box-shadow: 0 0 10px rgba(90, 132, 255, 0.3);
    outline: none;
}

.add-btn {
    background-color: transparent;
    color: #00ffb3;
    border: 2px solid #00ffb3;
}

.add-btn:hover {
    background-color: rgba(0, 255, 179, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 179, 0.5);
}

.delete-btn {
    background-color: transparent;
    color: #ff3a4c;
    border: 2px solid #ff3a4c;
    padding: 5px 10px;
    font-size: 16px;
    box-shadow: none;
}

.delete-btn:hover {
    background-color: rgba(255, 58, 76, 0.2);
    box-shadow: 0 0 10px rgba(255, 58, 76, 0.3);
}

.input-group {
    display: flex;
    margin-bottom: 10px;
    gap: 10px;
}

.input-group input, .input-group select {
    flex: 1;
}

.input-group button {
    width: auto;
}

.terminal-output {
    background-color: #1e1e2f;
    padding: 15px;
    border-left: 3px solid #5a84ff;
    margin-top: 20px;
    white-space: pre-wrap;
    min-height: 100px;
    font-family: 'VT323', monospace;
    font-size: 18px;
    color: #00ffb3;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.terminal-output::after {
    content: "_";
    position: relative;
    display: inline-block;
    animation: blink 1s infinite;
    color: #00ffb3;
}

.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.status {
    margin-top: 20px;
    padding: 15px;
    border-left: 3px solid #00ffb3;
    font-size: 20px;
    background-color: rgba(0, 255, 179, 0.1);
    color: #00ffb3;
}

.status.error {
    border-left-color: #ff3a4c;
    background-color: rgba(255, 58, 76, 0.1);
    color: #ff3a4c;
}

.value-tag {
    display: inline-flex;
    align-items: center;
    background-color: #1e1e2f;
    color: #c7d3e3;
    padding: 5px 10px;
    margin: 5px;
    border-radius: 3px;
    border-left: 2px solid #00ffb3;
    font-size: 18px;
}

.info-guide {
    background-color: #1e1e2f;
    padding: 20px;
    border-radius: 5px;
    border-left: 3px solid #00ffb3;
    margin-bottom: 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.info-guide p {
    margin-bottom: 15px;
    font-size: 18px;
    text-align: left;
    color: #c7d3e3;
}

.info-guide h3 {
    color: #00ffb3;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 22px;
}

.info-guide ul {
    margin: 0;
    padding-left: 25px;
}

.info-guide li {
    margin-bottom: 10px;
    font-size: 18px;
}

.info-guide ul ul li {
    font-size: 16px;
    margin-bottom: 5px;
}

.info-guide strong {
    color: #5a84ff;
}

.info-guide em {
    color: #aab1c0;
    font-style: italic;
}

.download-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 15px;
    background-color: transparent;
    border: 2px solid #00ffb3;
    color: #00ffb3;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-family: 'VT323', monospace;
    font-size: 18px;
}

.download-link:hover {
    background-color: rgba(0, 255, 179, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 179, 0.5);
}

/* Beacon Storage 和 Emulator 頁面樣式 */
.profile-form {
    background-color: #1e1e2f;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #323259;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

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

.profile-item {
    background-color: #1e1e2f;
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #323259;
    border-left: 3px solid #00ffb3;
    transition: all 0.3s ease;
}

.profile-item:hover {
    background-color: #292942;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.profile-details {
    flex: 1;
}

.profile-name {
    font-size: 1.4em;
    color: #00ffb3;
    margin-bottom: 10px;
}

.profile-info {
    margin: 5px 0;
    color: #c7d3e3;
}

.profile-label {
    color: #5a84ff;
    font-weight: bold;
}

.profile-value {
    color: #f7cf4c;
}

.no-profiles {
    text-align: center;
    padding: 20px;
    background-color: #1e1e2f;
    border-radius: 8px;
    border: 1px solid #323259;
    color: #777;
    font-size: 18px;
}

.button-group {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.start-btn {
    background-color: #1e1e2f;
    color: #00ffb3;
    border: 2px solid #00ffb3;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-family: 'VT323', monospace;
    font-size: 22px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 179, 0.3);
}

.start-btn:hover {
    background-color: rgba(0, 255, 179, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 179, 0.5);
}

.control-panel {
    background-color: #1e1e2f;
    border-radius: 10px;
    padding: 25px;
    border: 1px solid #323259;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.profile-select {
    width: 100%;
    padding: 12px;
    background-color: #0f0f17;
    border: 1px solid #323259;
    color: #c7d3e3;
    font-family: 'VT323', monospace;
    font-size: 18px;
    border-radius: 5px;
    margin: 10px 0;
    transition: all 0.3s ease;
}

.profile-select:focus {
    border-color: #5a84ff;
    box-shadow: 0 0 10px rgba(90, 132, 255, 0.4);
    outline: none;
}

.profile-select option {
    background-color: #1e1e2f;
    color: #c7d3e3;
}

/* 確保狀態指示器在這些頁面也能正常顯示 */
.status-indicator {
    display: block;
}

/* Beacon Scanner 頁面樣式 */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background-color: #1e1e2f;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #323259;
}

.scanner-status {
    font-size: 20px;
    color: #f7cf4c;
    display: flex;
    align-items: center;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(26, 26, 46, 0.5);
    border-radius: 50%;
    border-top-color: #5a84ff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
    vertical-align: middle;
    box-shadow: 0 0 10px rgba(90, 132, 255, 0.5);
}

.hidden {
    display: none !important;
}

.filter-container {
    margin-top: 10px;
    padding: 15px;
    background-color: #1e1e2f;
    border-radius: 5px;
    border: 1px solid #323259;
    margin-bottom: 20px;
}

.filter-input {
    width: 100%;
    padding: 10px 15px;
    background-color: #0f0f17;
    border: 1px solid #323259;
    color: #c7d3e3;
    font-family: 'VT323', monospace;
    font-size: 18px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.filter-input:focus {
    outline: none;
    border-color: #5a84ff;
    box-shadow: 0 0 10px rgba(90, 132, 255, 0.5);
}

.beacon-list {
    background-color: #1e1e2f;
    border-radius: 5px;
    padding: 0;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #323259;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.beacon-list::-webkit-scrollbar {
    width: 8px;
}

.beacon-list::-webkit-scrollbar-track {
    background: #1e1e2f;
    border-radius: 5px;
}

.beacon-list::-webkit-scrollbar-thumb {
    background: #5a84ff;
    border-radius: 5px;
}

.beacon-item {
    padding: 15px;
    border-bottom: 1px solid #323259;
    transition: background-color 0.3s;
    animation: fadeIn 0.3s ease-in;
}

.beacon-item:last-child {
    border-bottom: none;
}

.beacon-item:hover {
    background-color: #2a2a45;
}

.uuid-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.beacon-uuid {
    color: #00ffb3;
    font-size: 20px;
    word-break: break-all;
    padding-right: 10px;
}

.beacon-details {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    color: #c7d3e3;
}

.beacon-rssi {
    color: #ff3a4c;
}

.beacon-rssi.strong {
    color: #00ffb3;
}

.beacon-rssi.medium {
    color: #f7cf4c;
}

.no-beacons {
    text-align: center;
    padding: 30px;
    color: #777;
    font-size: 20px;
}

.copy-btn {
    background-color: transparent;
    border: 1px solid #5a84ff;
    color: #5a84ff;
    padding: 5px 10px;
    font-size: 14px;
    margin-left: 10px;
    border-radius: 3px;
    box-shadow: none;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background-color: rgba(90, 132, 255, 0.2);
    box-shadow: 0 0 5px rgba(90, 132, 255, 0.5);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Status indicators and controls (for other pages) */
.status-indicator {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    font-size: 22px;
    background-color: #1e1e2f;
    border-left: 3px solid #5a84ff;
}

.status-running {
    border-color: #00ffb3;
    color: #00ffb3;
}

.status-stopped {
    border-color: #ff3a4c;
    color: #ff3a4c;
}

button {
    background-color: #1e1e2f;
    color: #00ffb3;
    border: 2px solid #00ffb3;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-family: 'VT323', monospace;
    font-size: 22px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 179, 0.3);
}

button:hover {
    background-color: rgba(0, 255, 179, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 179, 0.5);
}

button.stop {
    color: #ff3a4c;
    border: 2px solid #ff3a4c;
    box-shadow: 0 0 10px rgba(255, 58, 76, 0.3);
}

button.stop:hover {
    background-color: rgba(255, 58, 76, 0.2);
    box-shadow: 0 0 20px rgba(255, 58, 76, 0.5);
}

button:disabled {
    background-color: #1e1e2f;
    border-color: #444;
    color: #777;
    cursor: not-allowed;
    box-shadow: none;
}

textarea {
    width: 100%;
    padding: 10px;
    background-color: #1e1e2f;
    border: 1px solid #323259;
    color: #c7d3e3;
    font-family: 'VT323', monospace;
    font-size: 18px;
    border-radius: 5px;
    transition: all 0.3s ease;
    resize: vertical;
}

textarea:focus {
    border-color: #5a84ff;
    box-shadow: 0 0 10px rgba(90, 132, 255, 0.3);
    outline: none;
}

.write-mode-panel {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #1e1e2f;
    border-radius: 10px;
    border: 1px solid #323259;
}

.error-message {
    color: #ff3a4c;
    font-weight: bold;
}

.remote-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
    max-width: 400px;
    margin: 20px auto;
}

.remote-button {
    background-color: #1e1e2f;
    border: 1px solid #323259;
    color: #c7d3e3;
    border-radius: 8px;
    padding: 15px 0;
    font-family: 'VT323', monospace;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.remote-button:hover {
    background-color: #323259;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.remote-button.active {
    background-color: #5a84ff;
    color: #fff;
}

.power-button {
    background-color: #ff3a4c;
    color: white;
    grid-column: span 3;
}

.number-button {
    font-size: 20px;
    font-weight: bold;
}

.action-button {
    background-color: #2c2c44;
}

.progress-container {
    width: 100%;
    background-color: #1e1e2f;
    border-radius: 5px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar {
    height: 20px;
    background-color: #5a84ff;
    width: 0%;
    transition: width 0.5s;
    text-align: center;
    color: white;
    line-height: 20px;
    font-size: 12px;
}

.settings-panel {
    background-color: #1e1e2f;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.result-card {
    background-color: #1e1e2f;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    border-left: 4px solid #5a84ff;
}

.code-display {
    font-family: monospace;
    background-color: #0f0f17;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    overflow-x: auto;
    white-space: nowrap;
}

.result-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.result-title h3 {
    margin: 0;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.small-button {
    padding: 5px 10px;
    font-size: 12px;
    background-color: #323259;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

.small-button:hover {
    background-color: #5a84ff;
}

.network-status {
    background-color: #1e1e2f;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.status-item {
    background-color: #272741;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.status-label {
    font-size: 12px;
    color: #a5a5c9;
    margin-bottom: 5px;
}

.status-value {
    font-size: 24px;
    font-weight: bold;
    font-family: 'VT323', monospace;
}

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

.client-item {
    background-color: #272741;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.client-info {
    display: flex;
    flex-direction: column;
}

.client-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.client-details {
    font-size: 12px;
    color: #a5a5c9;
}

.capture-panel {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.led-indicator {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #333;
    margin-right: 10px;
}

.led-recording {
    background-color: #ff3a4c;
    box-shadow: 0 0 10px #ff3a4c;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

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

.download-panel {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.packet-file {
    background-color: #272741;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.packet-file:hover {
    background-color: #323259;
}

.packet-info {
    display: flex;
    flex-direction: column;
}

.packet-name {
    font-weight: bold;
}

.packet-details {
    font-size: 12px;
    color: #a5a5c9;
}

.advanced-options {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #323259;
}

.checkbox-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 10px;
}

.networks-container {
    margin-top: 20px;
}

.network-item {
    background-color: #1e1e2f;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #323259;
    transition: all 0.3s ease;
}

.network-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.network-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.network-name {
    font-size: 18px;
    font-weight: bold;
}

.network-signal {
    display: flex;
    align-items: center;
}

.signal-strength {
    width: 60px;
    height: 12px;
    background-color: #272741;
    border-radius: 6px;
    overflow: hidden;
    margin-left: 10px;
}

.signal-bar {
    height: 100%;
    background: linear-gradient(90deg, #5a84ff, #82b1ff);
    border-radius: 6px;
}

.network-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

@media (min-width: 768px) {
    .network-details {
        grid-template-columns: repeat(4, 1fr);
    }
}

.network-detail {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 12px;
    color: #a5a5c9;
    margin-bottom: 5px;
}

.detail-value {
    font-family: 'VT323', monospace;
}

.scan-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.scan-option {
    display: flex;
    align-items: center;
    background-color: #1e1e2f;
    border-radius: 8px;
    padding: 8px 15px;
}

.scan-option input {
    margin-right: 10px;
}

.scan-action {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.security-wpa3 {
    border-left-color: #4CAF50;
}

.security-wpa2 {
    border-left-color: #2196F3;
}

.security-wpa {
    border-left-color: #FF9800;
}

.security-wep {
    border-left-color: #F44336;
}

.security-open {
    border-left-color: #9E9E9E;
}

.hidden-ssid {
    color: #a5a5c9;
    font-style: italic;
}

.band-indicator {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 10px;
}

.band-2g {
    background-color: #2c2c44;
    color: #a5a5c9;
}

.band-5g {
    background-color: #3a3a66;
    color: #c7c7f0;
}

.band-6g {
    background-color: #4a4a7d;
    color: #d5d5ff;
}

.controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.counter {
    background-color: #1e1e2f;
    padding: 5px 10px;
    border-radius: 5px;
    font-family: 'VT323', monospace;
}

.scan-summary {
    background-color: #1e1e2f;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 10px;
}

@media (min-width: 768px) {
    .summary-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.summary-item {
    text-align: center;
    padding: 10px;
    background-color: #272741;
    border-radius: 8px;
}

.summary-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    font-family: 'VT323', monospace;
}

.summary-label {
    font-size: 12px;
    color: #a5a5c9;
}

/* Animated elements */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.network-item {
    animation: fadeIn 0.3s ease forwards;
    opacity: 0;
}

.network-item:nth-child(1) { animation-delay: 0.1s; }
.network-item:nth-child(2) { animation-delay: 0.2s; }
.network-item:nth-child(3) { animation-delay: 0.3s; }
.network-item:nth-child(4) { animation-delay: 0.4s; }
.network-item:nth-child(5) { animation-delay: 0.5s; }
.network-item:nth-child(6) { animation-delay: 0.6s; }
.network-item:nth-child(7) { animation-delay: 0.7s; }
.network-item:nth-child(8) { animation-delay: 0.8s; }
.network-item:nth-child(9) { animation-delay: 0.9s; }
.network-item:nth-child(10) { animation-delay: 1.0s; }

.toggle-details {
    background: none;
    border: none;
    color: #5a84ff;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    padding: 0;
    margin-top: 10px;
}

.advanced-details {
    margin-top: 10px;
    display: none;
    border-top: 1px solid #323259;
    padding-top: 10px;
}

.qr-code {
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    background-color: #272741;
    border-radius: 8px;
    display: inline-block;
}

.qr-code img {
    max-width: 150px;
    max-height: 150px;
}

.network-item.selected {
    border: 2px solid #5a84ff;
    box-shadow: 0 0 10px rgba(90, 132, 255, 0.5);
}

.led-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #555;
    margin-right: 10px;
}

.led-recording {
    background-color: #ff3b30;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { background-color: #ff3b30; box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7); }
    50% { background-color: #ff6954; box-shadow: 0 0 0 10px rgba(255, 59, 48, 0); }
    100% { background-color: #ff3b30; box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

.capture-panel {
    display: flex;
    align-items: center;
    background-color: rgba(255, 59, 48, 0.1);
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    font-weight: bold;
}

.security-wpa3 {
    border-left: 5px solid #34c759; /* Green */
}

.security-wpa2 {
    border-left: 5px solid #5a84ff; /* Blue */
}

.security-wpa {
    border-left: 5px solid #ff9500; /* Orange */
}

.security-wep {
    border-left: 5px solid #ff3b30; /* Red */
}

.security-open {
    border-left: 5px solid #bbbbbb; /* Gray */
}

.terminal-output {
    font-family: 'VT323', monospace;
    line-height: 1.3;
    white-space: pre-wrap;
    overflow-y: auto;
    max-height: 200px;
    padding: 10px;
    margin-top: 10px;
    background-color: #0a0a12;
    border: 1px solid #333;
    color: #c7d3e3;
    border-radius: 5px;
}

.wifi-cracker-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.wifi-cracker-section {
    background-color: #1e1e2f;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #323259;
    position: relative;
    overflow: hidden;
}

.wifi-cracker-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #00ffb3;
    z-index: 1;
    opacity: 0.8;
}

.wifi-cracker-section h1 {
    color: #5a84ff;
    font-size: 1.8em;
    margin-bottom: 20px;
    border-bottom: 1px solid #323259;
    padding-bottom: 10px;
    text-shadow: 0 0 10px rgba(90, 132, 255, 0.5);
}

.wifi-cracker-section.completed::before {
    background: #00ffb3;
}

.wifi-cracker-section.active::before {
    background: #5a84ff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.wifi-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.wifi-button {
    background-color: transparent;
    color: #5a84ff;
    border: 2px solid #5a84ff;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'VT323', monospace;
    font-size: 18px;
    text-decoration: none;
    display: inline-block;
}

.wifi-button:hover {
    background-color: #5a84ff;
    color: #0f0f17;
    box-shadow: 0 0 15px rgba(90, 132, 255, 0.5);
}

.wifi-button:disabled {
    background-color: transparent;
    color: #666;
    border-color: #666;
    cursor: not-allowed;
    box-shadow: none;
}

.wifi-button.success {
    border-color: #00ffb3;
    color: #00ffb3;
}

.wifi-button.success:hover {
    background-color: #00ffb3;
    color: #0f0f17;
}

.wifi-button.danger {
    border-color: #ff3a4c;
    color: #ff3a4c;
}

.wifi-button.danger:hover {
    background-color: #ff3a4c;
    color: #0f0f17;
}

.wifi-select {
    background-color: #1e1e2f;
    border: 1px solid #323259;
    color: #c7d3e3;
    padding: 10px;
    border-radius: 5px;
    font-family: 'VT323', monospace;
    font-size: 18px;
    min-width: 200px;
}

.wifi-select:focus {
    border-color: #5a84ff;
    box-shadow: 0 0 10px rgba(90, 132, 255, 0.3);
    outline: none;
}

.wifi-input {
    background-color: #1e1e2f;
    border: 1px solid #323259;
    color: #c7d3e3;
    padding: 8px 12px;
    border-radius: 5px;
    font-family: 'VT323', monospace;
    font-size: 18px;
    width: 100px;
}

.wifi-input:focus {
    border-color: #5a84ff;
    box-shadow: 0 0 10px rgba(90, 132, 255, 0.3);
    outline: none;
}

.wifi-status {
    background-color: #292942;
    border: 1px solid #323259;
    border-radius: 5px;
    padding: 15px;
    margin-top: 15px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: #c7d3e3;
}

.wifi-status.success {
    background-color: rgba(0, 255, 179, 0.1);
    border-color: #00ffb3;
    color: #00ffb3;
}

.wifi-status.error {
    background-color: rgba(255, 58, 76, 0.1);
    border-color: #ff3a4c;
    color: #ff3a4c;
}

.wifi-status.info {
    background-color: rgba(90, 132, 255, 0.1);
    border-color: #5a84ff;
    color: #5a84ff;
}

.wifi-networks-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #292942;
    border-radius: 0; /* 移除圓角，由容器處理 */
    overflow: hidden;
    min-width: 600px; /* 確保表格最小寬度 */
}

.wifi-table-container {
    overflow-x: auto;
    overflow-y: visible;
    border-radius: 5px;
    border: 1px solid #323259;
    margin-top: 15px;
    -webkit-overflow-scrolling: touch; /* iOS 流暢滑動 */
}

/* 為小螢幕優化表格 */
@media (max-width: 768px) {
    .wifi-table-container {
        margin: 15px -10px 0 -10px; /* 稍微延伸到邊緣 */
    }
    
    .wifi-networks-table {
        min-width: 500px;
        font-size: 14px;
    }
    
    .wifi-networks-table th,
    .wifi-networks-table td {
        padding: 8px;
        white-space: nowrap;
    }
    
    .wifi-networks-table th:first-child,
    .wifi-networks-table td:first-child {
        position: sticky;
        left: 0;
        background-color: #1e1e2f;
        z-index: 2;
        border-right: 1px solid #323259;
    }
    
    .wifi-networks-table th:first-child {
        background-color: #1e1e2f;
    }
}

@media (max-width: 480px) {
    .wifi-table-container {
        margin: 15px -15px 0 -15px;
    }
    
    .wifi-networks-table {
        min-width: 450px;
        font-size: 12px;
    }
    
    .wifi-networks-table th,
    .wifi-networks-table td {
        padding: 6px;
    }
}

/* 滑動提示 */
.scroll-hint {
    text-align: center;
    color: #5a84ff;
    font-size: 14px;
    margin-top: 10px;
    opacity: 0.8;
    font-style: italic;
}

@media (min-width: 769px) {
    .scroll-hint {
        display: none;
    }
}