body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h3 {
    color: #333;
    margin-bottom: 15px;
}

.warning {
    background-color: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.browser-info {
    background-color: #f3e5f5;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
}

.btn-connect {
    background-color: #4caf50;
    color: white;
}

.btn-disconnect {
    background-color: #f44336;
    color: white;
}

.status {
    margin-top: 20px;
    padding: 10px;
    background-color: #e3f2fd;
    border-radius: 4px;
}

.tip {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

a {
    color: #1976d2;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ADB Section Styles */
.adb-section {
    margin: 20px 0;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.adb-tip {
    font-size: 14px;
    color: #333;
    margin-bottom: 15px;
    font-weight: bold;
}

.adb-buttons {
    margin-bottom: 10px;
    line-height: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}



.adb-btn {
    background-color: #4caf50;
    color: white;
    margin: 5px 5px 5px 0;
    vertical-align: middle;
}

.adb-port {
    margin-top: 15px;
}

.adb-port input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
    margin-right: 10px;
}

/* Progress and Toast Styles */
.progress {
    margin: 20px 0;
    height: 20px;
    overflow: hidden;
    background-color: #f5f5f5;
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
}

.progress-bar {
    float: left;
    width: 100%;
    height: 100%;
    font-size: 12px;
    line-height: 20px;
    color: #fff;
    text-align: center;
    background-color: #337ab7;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
    transition: width .6s ease;
}

.progress-striped .progress-bar {
    background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
    background-size: 40px 40px;
}

.progress.active .progress-bar {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    from { background-position: 40px 0; }
    to { background-position: 0 0; }
}

/* Toast Styles */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 4px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s;
    display: none;
}

#downloading-toast {
    width: 300px;
    text-align: center;
}

#download-progress {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

#download-progress-bar {
    height: 100%;
    background-color: #4caf50;
    width: 0%;
    transition: width 0.3s;
}

#download-progress-text {
    margin-top: 10px;
    font-size: 14px;
}

#success-toast {
    background-color: #4caf50;
    visibility: hidden;
}

/* Log Styles */
#exec-result {
    margin: 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 0;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-bottom: none;
    width: 100%;
    max-width: 800px;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-height: 40vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    transition: max-height 0.3s ease;
}

#exec-result.collapsed {
    max-height: 30px;
    overflow-y: hidden;
    padding: 8px 15px;
    border-radius: 0;
}

#exec-result.collapsed #log {
    display: none;
}

#exec-result.collapsed .progress {
    display: none;
}

#exec-result-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    margin: -15px -15px 10px -15px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
}

#exec-result-toggle:hover {
    background-color: #0056b3;
}

#exec-result h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

#log {
    width: 100%;
    min-height: 150px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    font-family: monospace;
    font-size: 12px;
    overflow-y: scroll;
    white-space: pre-wrap;
    margin: 0;
    background-color: white;
    box-sizing: border-box;
}

/* App List Styles */
#package-list {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

#package-list th, #package-list td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#package-list th {
    background-color: #f2f2f2;
}

/* Shell Input Styles */
#shell {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 10px 0;
}

/* APK File Styles */
#apkFile {
    margin: 10px 0;
}

#apkFileName {
    margin-left: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .adb-buttons {
        line-height: 30px;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    #log {
        height: 150px;
    }
}