* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', 'Fira Code', 'Menlo', 'Monaco', 'Courier New', monospace;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    font-feature-settings: "liga" 1, "calt" 1; /* 启用连字 */
}

.desktop {
    width: 100%;
    max-width: 900px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* macOS 窗口样式 */
.window {
    background: rgba(30, 30, 30, 0.95);
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* 标题栏 */
.titlebar {
    background: rgba(40, 40, 40, 0.95);
    padding: 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.buttons {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: filter 0.2s;
}

.button:hover {
    filter: brightness(1.2);
}

.button.close {
    background: #ff5f57;
}

.button.minimize {
    background: #febc2e;
}

.button.maximize {
    background: #28c840;
}

.title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
}

/* 终端区域 */
.terminal {
    background: rgba(0, 0, 0, 0.85);
    color: #e4e4e4;
    padding: 20px;
    min-height: 500px;
    max-height: 70vh;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.8;
    letter-spacing: 0.3px;
}

/* 自定义滚动条 */
.terminal::-webkit-scrollbar {
    width: 8px;
}

.terminal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.terminal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.terminal::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 输出区域 */
.output {
    margin-bottom: 10px;
}

.welcome-message {
    color: #50fa7b;
    margin-bottom: 20px;
}

.welcome-message pre {
    font-size: 12px;
    color: #8be9fd;
    margin-bottom: 10px;
    font-weight: 600;
}

.welcome-message p {
    margin: 5px 0;
}

.highlight {
    color: #f1fa8c;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(241, 250, 140, 0.3);
}

/* 命令行 */
.command-line {
    margin: 8px 0;
    font-weight: 500;
}

.prompt {
    color: #50fa7b;
    user-select: none;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(80, 250, 123, 0.4);
}

.command {
    color: #f8f8f2;
    margin-left: 5px;
    font-weight: 500;
}

/* 命令输出 */
.command-output {
    color: #e4e4e4;
    margin: 8px 0 8px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.error {
    color: #ff5555;
    font-weight: 500;
}

.success {
    color: #50fa7b;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(80, 250, 123, 0.3);
}

.info {
    color: #8be9fd;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(139, 233, 253, 0.3);
}

.warning {
    color: #ffb86c;
    font-weight: 500;
}

/* 输入行 */
.input-line {
    display: flex;
    align-items: center;
}

.input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #f8f8f2;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    caret-color: #50fa7b;
    letter-spacing: 0.3px;
}

/* 图标样式 */
.icon {
    margin-right: 8px;
    display: inline-block;
    width: 20px;
    text-align: center;
}

.cmd-icon {
    color: #8be9fd;
    margin-right: 10px;
}

/* 表格样式 */
table {
    border-collapse: collapse;
    margin: 10px 0;
}

table td {
    padding: 5px 15px 5px 0;
    line-height: 1.8;
}

table td:first-child {
    color: #bd93f9;
    font-weight: 600;
}

table td:last-child {
    color: #f8f8f2;
}

/* 链接样式 */
a {
    color: #8be9fd;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

a:hover {
    color: #50fa7b;
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(80, 250, 123, 0.5);
}

/* 列表样式 */
ul {
    list-style: none;
    padding-left: 20px;
}

ul li {
    margin: 5px 0;
    position: relative;
    color: #f8f8f2;
}

ul li:before {
    content: "▸";
    color: #50fa7b;
    position: absolute;
    left: -15px;
    font-weight: 600;
}

/* 代码块 */
code {
    background: rgba(189, 147, 249, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    color: #f1fa8c;
    font-weight: 600;
    border: 1px solid rgba(241, 250, 140, 0.3);
    font-size: 13px;
}

/* 光标动画 */
@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #50fa7b;
    animation: blink 1s infinite;
    margin-left: 2px;
}

/* 分隔线 */
.divider {
    border-top: 1px solid rgba(139, 233, 253, 0.3);
    margin: 15px 0;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.badge-primary {
    background: rgba(139, 233, 253, 0.2);
    color: #8be9fd;
    border: 1px solid rgba(139, 233, 253, 0.4);
}

.badge-success {
    background: rgba(80, 250, 123, 0.2);
    color: #50fa7b;
    border: 1px solid rgba(80, 250, 123, 0.4);
}

.badge-warning {
    background: rgba(255, 184, 108, 0.2);
    color: #ffb86c;
    border: 1px solid rgba(255, 184, 108, 0.4);
}

/* 弹窗遮罩层 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-in;
}

.modal-overlay.active {
    display: flex;
}

/* 弹窗窗口 */
.modal-window {
    background: rgba(40, 40, 40, 0.98);
    border-radius: 12px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow: hidden;
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 弹窗标题栏 */
.modal-titlebar {
    background: rgba(50, 50, 50, 0.95);
    padding: 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-buttons {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.modal-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
}

/* 弹窗内容 */
.modal-content {
    padding: 30px;
    max-height: calc(85vh - 60px);
    overflow-y: auto;
    color: #e4e4e4;
    line-height: 1.8;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.modal-content h1 {
    color: #8be9fd;
    font-size: 28px;
    margin-bottom: 10px;
    text-shadow: 0 0 15px rgba(139, 233, 253, 0.3);
}

.modal-content h2 {
    color: #50fa7b;
    font-size: 22px;
    margin: 25px 0 15px 0;
    text-shadow: 0 0 12px rgba(80, 250, 123, 0.3);
}

.modal-content h3 {
    color: #bd93f9;
    font-size: 18px;
    margin: 20px 0 10px 0;
}

.modal-content p {
    margin: 15px 0;
    color: #f8f8f2;
}

.modal-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-content .profile-section {
    display: flex;
    gap: 30px;
    margin: 30px 0;
    align-items: flex-start;
}

.modal-content .profile-image {
    flex-shrink: 0;
}

.modal-content .profile-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(139, 233, 253, 0.5);
    box-shadow: 0 0 30px rgba(139, 233, 253, 0.3);
}

.modal-content .profile-info {
    flex: 1;
}

.modal-content .skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.modal-content .skill-item {
    background: rgba(139, 233, 253, 0.1);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(139, 233, 253, 0.3);
    text-align: center;
    transition: all 0.3s;
}

.modal-content .skill-item:hover {
    background: rgba(139, 233, 253, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 233, 253, 0.3);
}

.modal-content .timeline {
    border-left: 2px solid rgba(139, 233, 253, 0.5);
    padding-left: 30px;
    margin: 20px 0;
}

.modal-content .timeline-item {
    margin-bottom: 30px;
    position: relative;
}

.modal-content .timeline-item:before {
    content: '';
    position: absolute;
    left: -36px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8be9fd;
    box-shadow: 0 0 15px rgba(139, 233, 253, 0.6);
}

/* 关闭按钮交互 */
.modal-titlebar .button.close {
    cursor: pointer;
}

.modal-titlebar .button.close:hover {
    filter: brightness(1.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .terminal {
        font-size: 12px;
        padding: 15px;
        min-height: 400px;
    }
    
    .welcome-message pre {
        font-size: 10px;
    }
    
    .modal-window {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .modal-content .profile-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .modal-content .profile-image img {
        width: 150px;
        height: 150px;
    }
    
    .modal-content .skill-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}
