/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    height: 100%;
    background-color: #1a1a1a;
    color: #ffffff;
    line-height: 1.6;
}

/* 连接页面样式 */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.connection-form {
    background-color: #2d2d2d;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 500px;
}

.connection-form h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #4CAF50;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #cccccc;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background-color: #1a1a1a;
    color: #ffffff;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

/* 认证方式选项样式 */
.auth-options {
    display: flex;
    gap: 20px;
    margin-top: 5px;
    flex-wrap: nowrap;
}

.auth-options label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: normal;
    white-space: nowrap;
    margin-right: 20px;
}

.connect-btn {
    width: 100%;
    padding: 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.connect-btn:hover {
    background-color: #45a049;
}

/* GOGO源码网跳转按钮样式 */
.gogo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
    padding: 18px;
    background: linear-gradient(135deg, #4CAF50, #4a90e2, #4CAF50);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 8px 30px rgba(76, 175, 80, 0.3),
        0 4px 15px rgba(74, 144, 226, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: btn-pulse 2s infinite alternate;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gogo-btn:hover {
    background: linear-gradient(135deg, #4a90e2, #4CAF50, #4a90e2);
    box-shadow: 
        0 12px 40px rgba(76, 175, 80, 0.4),
        0 6px 20px rgba(74, 144, 226, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-3px) scale(1.02);
    animation: btn-pulse 1s infinite alternate;
}

.gogo-btn:active {
    transform: translateY(0) scale(0.98);
}

@keyframes btn-pulse {
    0% {
        box-shadow: 
            0 8px 30px rgba(76, 175, 80, 0.3),
            0 4px 15px rgba(74, 144, 226, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    100% {
        box-shadow: 
            0 12px 40px rgba(76, 175, 80, 0.4),
            0 6px 20px rgba(74, 144, 226, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

/* 防止连接中断说明样式 */
.info-box {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(76, 175, 80, 0.1);
    border-left: 4px solid #4CAF50;
    border-radius: 5px;
    color: #cccccc;
}

.info-box h3 {
    color: #4CAF50;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
}

.info-box p {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.info-box ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.info-box li {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.info-box ul {
    margin-left: 20px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.info-box code {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #4CAF50;
    font-weight: bold;
}

/* 终端页面样式 */
.terminal-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2d2d2d;
    padding: 10px 20px;
    border-bottom: 1px solid #444;
}

.toolbar h2 {
    color: #4CAF50;
    font-size: 20px;
}

.toolbar-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.toolbar-btn:hover {
    background-color: #45a049;
}

/* 工具栏右侧 */
.toolbar-right {
    display: flex;
    gap: 10px;
}

/* 文件系统面板 */
.filesystem-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background-color: #2d2d2d;
    border-left: 1px solid #444;
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.filesystem-panel.open {
    right: 0;
}

.filesystem-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #444;
}

.filesystem-header h3 {
    color: #4CAF50;
}

.close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.filesystem-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.path-nav {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #1a1a1a;
    border-radius: 5px;
    font-size: 14px;
}

.file-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-bottom: 5px;
}

.file-item:hover {
    background-color: #444;
}

.file-item.directory {
    color: #4CAF50;
}

.file-item.file {
    color: #cccccc;
}

.file-icon {
    margin-right: 10px;
    font-size: 18px;
}

.file-name {
    flex: 1;
}

.file-size {
    font-size: 12px;
    color: #999;
}

.upload-section {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #444;
    display: flex;
    gap: 10px;
}

.upload-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 14px;
}

.upload-btn:hover {
    background-color: #45a049;
}

/* 终端区域 */
.terminal-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #000000;
    padding: 10px;
    position: relative;
    overflow: hidden;
}

.terminal {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-all;
    margin-bottom: 10px;
    position: relative;
}

/* 光标样式 */
.cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background-color: white;
    animation: blink 1s infinite;
    margin-left: -2px;
    margin-right: -6px;
}

/* 终端输入区域 */
.terminal-input-area {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: #000000;
    border-top: 2px solid #4CAF50;
    position: relative;
    /* 整个输入区域高亮 - 增强视觉效果 */
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.4),
                inset 0 0 4px rgba(76, 175, 80, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 0;
    background: linear-gradient(145deg, #0a0a0a, #1a1a1a);
    min-height: 60px;
}

.terminal-input-area:focus-within {
    /* 聚焦时高亮增强 */
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.6),
                0 0 30px rgba(76, 175, 80, 0.3),
                inset 0 0 8px rgba(76, 175, 80, 0.4);
    border-color: #66bb6a;
    transform: translateY(-1px);
}

/* 输入提示符 */
.input-prompt {
    color: #4CAF50;
    font-weight: bold;
    margin-right: 12px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 17px;
    line-height: 1.6;
}

/* 终端输入框样式 */
.terminal-input {
    flex: 1;
    background-color: transparent;
    color: #ffffff;
    border: none;
    outline: none;
    font-family: 'Courier New', Courier, monospace;
    font-size: 17px;
    padding: 10px 0;
    caret-color: white;
    letter-spacing: 0.5px;
    line-height: 1.6;
}

.terminal-input::placeholder {
    color: #666666;
    opacity: 0.7;
    font-style: italic;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}



/* 系统监控浮窗 */
.system-monitor {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(45, 45, 45, 0.9);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
    cursor: move;
    user-select: none;
    border: 2px solid rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.system-monitor:hover {
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
    border-color: rgba(76, 175, 80, 0.6);
}

.system-monitor:active {
    cursor: grabbing;
    box-shadow: 0 0 25px rgba(76, 175, 80, 0.7);
}

.monitor-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.monitor-item i {
    color: #4CAF50;
    font-size: 18px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .connection-form {
        padding: 20px;
    }
    
    .filesystem-panel {
        width: 100%;
        right: -100%;
    }
    
    .toolbar {
        padding: 10px;
    }
    
    .toolbar h2 {
        font-size: 18px;
    }
    
    .toolbar-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .system-monitor {
        bottom: 10px;
        right: 10px;
        padding: 10px;
    }
    
    .monitor-item {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .connection-form {
        padding: 15px;
    }
    
    .form-group input {
        padding: 10px;
        font-size: 14px;
    }
    
    .connect-btn {
        padding: 12px;
        font-size: 16px;
    }
    
    .terminal {
        font-size: 13px;
    }
    
    .terminal-input {
        font-size: 17px;
        padding: 10px 0;
    }
    
    .terminal-input-area {
        padding: 15px 20px;
        margin: 10px;
        border-radius: 10px;
    }
    
    .input-prompt {
        font-size: 17px;
        margin-right: 12px;
    }
}

/* 公告弹窗样式 */
.modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #2d2d2d;
    margin: 20px;
    padding: 0;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #444;
}

.modal-header h2 {
    color: #4CAF50;
    margin: 0;
}

.modal .close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.modal .close-btn:hover {
    color: #4CAF50;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin-bottom: 15px;
    color: #cccccc;
}

.modal-body ul {
    margin-bottom: 15px;
    padding-left: 20px;
    color: #cccccc;
}

.modal-body li {
    margin-bottom: 10px;
}