/**
 * Common Styles
 * 公共样式
 */

/* === 全局样式 === */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === 根容器 === */
#root {
    min-height: 100vh;
}

/* === 登录页面样式 === */
body.login-page {
    background: var(--gradient-purple);
    min-height: 100vh;
}

body.login-page #root {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-medium);
    padding: var(--spacing-xl);
    width: var(--login-container-width);
    max-width: 90%;
}

.login-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
}

/* === Dashboard样式 === */
.dashboard-container {
    min-height: 100vh;
    background: var(--bg-light);
}

.dashboard-header {
    background: var(--bg-white);
    padding: 0 var(--spacing-md);
    box-shadow: var(--shadow-small);
}

.dashboard-content {
    padding: var(--spacing-md);
}

/* === 统计卡片 === */
.stat-card {
    text-align: center;
}

.stat-value {
    font-size: var(--font-size-xxl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
}

/* === 终端容器 === */
.terminal-container {
    background: var(--bg-black);
    padding: 10px;
    border-radius: var(--radius-sm);
    height: var(--terminal-height);
}

/* === SSH Tab样式 === */
.ant-tabs {
    height: 100%;
}

.ant-tabs-content {
    height: 100%;
}

.ant-tabs-tabpane {
    height: 100%;
}

/* === VNC页面样式 === */
body.vnc-page {
    background: var(--bg-light);
    overflow: hidden;
}

body.vnc-page #root {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.vnc-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-black);
    position: relative;
}

.vnc-toolbar {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    display: flex;
    gap: var(--spacing-xs);
    z-index: 1000;
}

.vnc-screen {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
}

.vnc-status {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--bg-white);
    z-index: 999;
}

.connection-params {
    max-width: var(--connection-params-width);
    margin: 100px auto;
    padding: var(--spacing-md);
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-medium);
}
