/* ==================== 前端样式 ==================== */
.icg-container {
    max-width: 600px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.icg-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.icg-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px 0;
    text-align: center;
}

.icg-desc {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.6;
}

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

.icg-form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.icg-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: "Courier New", monospace;
    resize: vertical;
    transition: border-color 0.3s;
    box-sizing: border-box;
    line-height: 1.8;
}

.icg-form-group textarea:focus {
    outline: none;
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.icg-form-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.icg-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.icg-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.icg-btn-primary {
    background: linear-gradient(135deg, #4a6cf7, #6366f1);
    color: #fff;
}

.icg-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #3b5de7, #5558e6);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(74, 108, 247, 0.3);
}

.icg-btn-secondary {
    background: #f0f2f5;
    color: #333;
}

.icg-btn-secondary:hover:not(:disabled) {
    background: #e4e7ed;
}

.icg-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.icg-message-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.icg-message-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.icg-message-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.icg-result {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #86efac;
    border-radius: 12px;
    text-align: center;
}

.icg-result-title {
    font-size: 18px;
    font-weight: 700;
    color: #166534;
    margin-bottom: 8px;
}

.icg-result-code {
    display: inline-block;
    background: #fff;
    padding: 12px 30px;
    font-size: 28px;
    font-weight: 700;
    font-family: "Courier New", monospace;
    color: #4a6cf7;
    border: 2px dashed #4a6cf7;
    border-radius: 8px;
    letter-spacing: 4px;
    margin: 10px 0;
    user-select: all;
}

.icg-result-hint {
    color: #666;
    font-size: 13px;
}

/* 注册页邀请码字段 */
.icg-register-field {
    margin-bottom: 15px;
}

.icg-register-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.icg-register-field input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.icg-register-field input:focus {
    border-color: #4a6cf7;
    outline: none;
}

.icg-code-status {
    display: block;
    margin-top: 4px;
    font-size: 12px;
}

.icg-code-status.valid {
    color: #2e7d32;
}

.icg-code-status.invalid {
    color: #c62828;
}
