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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    font-size: 2.5rem;
    font-weight: 300;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    margin-right: 12px;
}

.card-icon.php {
    background: linear-gradient(135deg, #4285f4, #34a853);
}

.card-icon.java {
    background: linear-gradient(135deg, #ea4335, #fbbc05);
}

.card-icon.member {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
}

.card-icon.store {
    background: linear-gradient(135deg, #a55eea, #26de81);
}

.card-icon.foreign {
    background: linear-gradient(135deg, #fd79a8, #fdcb6e);
}

.card-icon.knowledge {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
}

.card-title {
    flex: 1;
}

.card-title h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    background: #e3f2fd;
    color: #1976d2;
}

.tag.orange {
    background: #fff3e0;
    color: #f57c00;
}

.tag.yellow {
    background: #fffde7;
    color: #f9a825;
}

.tag.purple {
    background: #f3e5f5;
    color: #7b1fa2;
}

.card-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.card-image {
    max-height: 190px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.architecture-diagram {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.server-node {
    position: absolute;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: float 3s ease-in-out infinite;
}

.server-node.main {
    width: 32px;
    height: 32px;
    z-index: 2;
}

.server-node.left {
    left: 20%;
    animation-delay: -1s;
}

.server-node.right {
    right: 20%;
    animation-delay: -2s;
}

.server-node.top {
    top: 20%;
    animation-delay: -0.5s;
}

.server-node.bottom {
    bottom: 20%;
    animation-delay: -1.5s;
}

.server-node.blue {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.server-node.purple {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    max-height: 70vh;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.modal-header h2 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    margin-left: 16px;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 0 24px 24px;
    max-height: calc(70vh - 80px);
    overflow-y: auto;
}

#modal-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.modal-features, .modal-tech {
    margin-bottom: 20px;
}

.modal-features h3, .modal-tech h3 {
    color: #333;
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
}

#modal-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#modal-features-list li {
    padding: 6px 0;
    color: #555;
    position: relative;
    padding-left: 18px;
    font-size: 14px;
}

#modal-features-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #4285f4;
    font-weight: bold;
    font-size: 16px;
}

#modal-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: #f1f3f4;
    color: #5f6368;
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e8eaed;
}

/* 弹窗按钮样式 */
.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e8eaed;
}

.modal-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn.primary {
    background: #4285f4;
    color: white;
}

.modal-btn.primary:hover {
    background: #3367d6;
}

.modal-btn.secondary {
    background: #f8f9fa;
    color: #5f6368;
    border: 1px solid #dadce0;
}

.modal-btn.secondary:hover {
    background: #f1f3f4;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header, .modal-body {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* 卡片悬停效果增强 */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
}

.card:hover::before {
    opacity: 1;
}