.contact-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 2rem 2rem;
    background-color: #fafafa;
    transition: background-color 0.2s ease, padding-top 0.2s ease;
}

body.dark-mode .contact-page {
    background-color: #0f0f0f;
}

.contact-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-title {
    font-size: 2.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #18181b;
    margin-bottom: 0.5rem;
}

body.dark-mode .contact-title {
    color: #e4e4e7;
}

.contact-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

body.dark-mode .contact-subtitle {
    color: #94a3b8;
}

.contact-group-wrapper {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.8rem 1.8rem 1.2rem 1.8rem;
    margin-bottom: 2rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

body.dark-mode .contact-group-wrapper {
    background-color: #1a1a1a;
    border-color: #2e2e2e;
}

.group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.group-qq-icon {
    color: #4f46e5;
}

body.dark-mode .group-qq-icon {
    color: #818cf8;
}

.group-title {
    font-size: 1.5rem;
    font-weight: 550;
    color: #18181b;
    letter-spacing: -0.01em;
}

body.dark-mode .group-title {
    color: #e4e4e7;
}

.contact-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.contact-card {
    flex: 1 1 360px;
    max-width: 420px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.8rem 1.8rem 1.2rem 1.8rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

body.dark-mode .contact-card {
    background-color: #1a1a1a;
    border-color: #2e2e2e;
}

.contact-card:hover {
    background-color: #f5f5f5;
    border-color: #d1d5db;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

body.dark-mode .contact-card:hover {
    background-color: #262626;
    border-color: #52525b;
}

.contact-card .card-header {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    margin-bottom: 0.75rem;
}

.contact-card .server-name {
    font-size: 2rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

body.dark-mode .contact-card .server-name {
    color: #f1f5f9;
}

.server-version-badge {
    font-size: 1rem;
    font-weight: 450;
    color: #64748b;
    margin-left: 6px;
}

body.dark-mode .server-version-badge {
    color: #94a3b8;
}

.group-name-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.2rem 0;
}

.group-name-label {
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

body.dark-mode .group-name-label {
    color: #94a3b8;
}

.group-name-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
}

body.dark-mode .group-name-value {
    color: #f1f5f9;
}

.qq-info {
    margin-bottom: 1.2rem;
}

.qq-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.5rem;
}

body.dark-mode .qq-label {
    color: #94a3b8;
}

.qq-number-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.25rem 0.25rem 0.25rem 1rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.contact-card:hover .qq-number-wrapper {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

body.dark-mode .qq-number-wrapper {
    background-color: #1e1e1e;
    border-color: #3f3f46;
}

body.dark-mode .contact-card:hover .qq-number-wrapper {
    background-color: #2a2a2a;
    border-color: #52525b;
}

.qq-number {
    font-size: 1.5rem;
    font-weight: 500;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    color: #0f172a;
    flex: 1;
}

body.dark-mode .qq-number {
    color: #f1f5f9;
}

.copy-qq-btn {
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 12px;
    color: #64748b;
    transition: border-color 0.2s ease, background 0.2s;
    flex-shrink: 0;
}

.copy-qq-btn:hover {
    background: #ffffff;
    border-color: #94a3b8;
    color: #0f172a;
}

body.dark-mode .copy-qq-btn {
    color: #cbd5e1;
}

body.dark-mode .copy-qq-btn:hover {
    background: #2e2e2e;
    border-color: #a1a1aa;
    color: #f1f5f9;
}

.join-group-wrapper {
    display: flex;
    justify-content: flex-start;
    margin-top: 0.5rem;
}

.join-group-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 16px;
    padding: 0.8rem 1.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4f46e5;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    width: 100%;
}

.join-group-btn:hover {
    background-color: #e0e7ff;
    border-color: #a5b4fc;
}

body.dark-mode .join-group-btn {
    background-color: #1e1b4b;
    border-color: #4338ca;
    color: #a5b4fc;
}

body.dark-mode .join-group-btn:hover {
    background-color: #312e81;
    border-color: #6366f1;
}

.personal-card {
    display: flex;
    flex-direction: column;
    margin-top: 2rem;
}

.qrcode-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 1.5rem;
    margin-top: 1.2rem;
}

.qrcode-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qrcode-wrapper {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: border-color 0.2s;
    line-height: 0;
}

.qrcode-wrapper:hover {
    border-color: #cbd5e1;
}

body.dark-mode .qrcode-wrapper {
    background-color: #2a2a2a;
    border-color: #52525b;
}

.qrcode-image {
    display: block;
    width: 160px;
    height: 160px;
    object-fit: cover;
}

.qrcode-label {
    margin-top: 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
}

body.dark-mode .qrcode-label {
    color: #94a3b8;
}

@media (max-width: 640px) {
    .contact-page {
        min-height: 70vh;
    }
    .contact-title {
        font-size: 2.2rem;
    }
    .contact-subtitle {
        font-size: 1.1rem;
    }
    .contact-group-wrapper {
        padding: 1.5rem 1.2rem 1rem 1.2rem;
    }
    .group-title {
        font-size: 1.3rem;
    }
    .contact-card {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
    .contact-card .server-name {
        font-size: 1.8rem;
    }
    .group-name-value {
        font-size: 1.15rem;
    }
    .qq-number {
        font-size: 1.3rem;
    }
    .qrcode-container {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .qrcode-image {
        width: 130px;
        height: 130px;
    }
    .join-group-btn {
        padding: 0.7rem 1.5rem;
        font-size: 1rem;
    }
}